Mike Frysinger | d89e629 | 2005-04-24 05:07:59 +0000 | [diff] [blame] | 1 | /* |
| 2 | * File: e2fsbb.h |
| 3 | * |
| 4 | * Redefine a bunch of e2fsprogs stuff to use busybox routines |
| 5 | * instead. This makes upgrade between e2fsprogs versions easy. |
| 6 | */ |
| 7 | |
| 8 | #ifndef __E2FSBB_H__ |
| 9 | #define __E2FSBB_H__ 1 |
| 10 | |
| 11 | #include "libbb.h" |
| 12 | |
| 13 | /* version we've last synced against */ |
| 14 | #define E2FSPROGS_VERSION "1.37" |
| 15 | #define E2FSPROGS_DATE "21-Mar-2005" |
| 16 | |
| 17 | /* make sure com_err.h isnt included before us */ |
| 18 | #ifdef __COM_ERR_H__ |
| 19 | #error You should not have included com_err.h ! |
| 20 | #endif |
| 21 | #define __COM_ERR_H__ |
| 22 | |
| 23 | /* com_err crap */ |
| 24 | #define com_err(w, c, fmt, args...) bb_error_msg(fmt, ## args) |
| 25 | typedef long errcode_t; |
| 26 | #define ERRCODE_RANGE 8 |
| 27 | #define error_message(code) strerror((int) (code & ((1<<ERRCODE_RANGE)-1))) |
| 28 | |
Mike Frysinger | d89e629 | 2005-04-24 05:07:59 +0000 | [diff] [blame] | 29 | /* misc crap */ |
Mike Frysinger | 51a43b4 | 2005-09-24 07:11:16 +0000 | [diff] [blame] | 30 | #define fatal_error(err, msg) bb_error_msg_and_die(msg) |
Mike Frysinger | d89e629 | 2005-04-24 05:07:59 +0000 | [diff] [blame] | 31 | #define usage() bb_show_usage() |
Mike Frysinger | d89e629 | 2005-04-24 05:07:59 +0000 | [diff] [blame] | 32 | |
Mike Frysinger | 942e137 | 2005-06-11 00:03:13 +0000 | [diff] [blame] | 33 | /* header defines */ |
Mike Frysinger | 51a43b4 | 2005-09-24 07:11:16 +0000 | [diff] [blame] | 34 | #define ENABLE_HTREE 1 |
Mike Frysinger | 942e137 | 2005-06-11 00:03:13 +0000 | [diff] [blame] | 35 | #define HAVE_ERRNO_H 1 |
Mike Frysinger | 942e137 | 2005-06-11 00:03:13 +0000 | [diff] [blame] | 36 | #define HAVE_EXT2_IOCTLS 1 |
Mike Frysinger | 51a43b4 | 2005-09-24 07:11:16 +0000 | [diff] [blame] | 37 | #define HAVE_INTTYPES_H 1 |
| 38 | #define HAVE_LINUX_FD_H 1 |
| 39 | #define HAVE_MALLOC_H 1 |
| 40 | #define HAVE_MNTENT_H 1 |
| 41 | #define HAVE_NETINET_IN_H 1 |
| 42 | #define HAVE_NET_IF_H 1 |
Mike Frysinger | 51a43b4 | 2005-09-24 07:11:16 +0000 | [diff] [blame] | 43 | #define HAVE_SYS_IOCTL_H 1 |
| 44 | #define HAVE_SYS_MOUNT_H 1 |
| 45 | #define HAVE_SYS_QUEUE_H 1 |
| 46 | #define HAVE_SYS_RESOURCE_H 1 |
| 47 | #define HAVE_SYS_SOCKET_H 1 |
Mike Frysinger | 942e137 | 2005-06-11 00:03:13 +0000 | [diff] [blame] | 48 | #define HAVE_SYS_STAT_H 1 |
Mike Frysinger | 51a43b4 | 2005-09-24 07:11:16 +0000 | [diff] [blame] | 49 | #define HAVE_SYS_TIME_H 1 |
Mike Frysinger | 942e137 | 2005-06-11 00:03:13 +0000 | [diff] [blame] | 50 | #define HAVE_SYS_TYPES_H 1 |
| 51 | #define HAVE_UNISTD_H 1 |
Mike Frysinger | 942e137 | 2005-06-11 00:03:13 +0000 | [diff] [blame] | 52 | |
Rob Landley | 391a904 | 2006-01-23 21:38:06 +0000 | [diff] [blame] | 53 | /* Endianness */ |
| 54 | #if __BYTE_ORDER== __BIG_ENDIAN |
| 55 | #define ENABLE_SWAPFS 1 |
| 56 | #define WORDS_BIGENDIAN 1 |
| 57 | #endif |
| 58 | |
Mike Frysinger | d89e629 | 2005-04-24 05:07:59 +0000 | [diff] [blame] | 59 | #endif /* __E2FSBB_H__ */ |