e2fsbb.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. #ifndef __E2FSBB_H__
  8. #define __E2FSBB_H__ 1
  9. #include "libbb.h"
  10. /* version we've last synced against */
  11. #define E2FSPROGS_VERSION "1.38"
  12. #define E2FSPROGS_DATE "30-Jun-2005"
  13. /* make sure com_err.h isnt included before us */
  14. #ifdef __COM_ERR_H__
  15. #error You should not have included com_err.h !
  16. #endif
  17. #define __COM_ERR_H__
  18. /* com_err crap */
  19. #define com_err(w, c, fmt, args...) bb_error_msg(fmt, ## args)
  20. typedef long errcode_t;
  21. #define ERRCODE_RANGE 8
  22. #define error_message(code) strerror((int) (code & ((1<<ERRCODE_RANGE)-1)))
  23. /* misc crap */
  24. #define fatal_error(err, msg) bb_error_msg_and_die(msg)
  25. #define usage() bb_show_usage()
  26. /* header defines */
  27. #define ENABLE_HTREE 1
  28. #define HAVE_ERRNO_H 1
  29. #define HAVE_EXT2_IOCTLS 1
  30. #define HAVE_INTTYPES_H 1
  31. #define HAVE_LINUX_FD_H 1
  32. #define HAVE_MALLOC_H 1
  33. #define HAVE_MNTENT_H 1
  34. #define HAVE_NETINET_IN_H 1
  35. #define HAVE_NET_IF_H 1
  36. #define HAVE_SYS_IOCTL_H 1
  37. #define HAVE_SYS_MOUNT_H 1
  38. #define HAVE_SYS_QUEUE_H 1
  39. #define HAVE_SYS_RESOURCE_H 1
  40. #define HAVE_SYS_SOCKET_H 1
  41. #define HAVE_SYS_STAT_H 1
  42. #define HAVE_SYS_TIME_H 1
  43. #define HAVE_SYS_TYPES_H 1
  44. #define HAVE_UNISTD_H 1
  45. /* Endianness */
  46. #if __BYTE_ORDER == __BIG_ENDIAN
  47. #define ENABLE_SWAPFS 1
  48. #define WORDS_BIGENDIAN 1
  49. #endif
  50. #endif /* __E2FSBB_H__ */