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))) |
Mike Frysinger | ba3a01f | 2005-05-07 06:49:54 +0000 | [diff] [blame] | 28 | #define initialize_ext2_error_table(x) |
Mike Frysinger | d89e629 | 2005-04-24 05:07:59 +0000 | [diff] [blame] | 29 | |
| 30 | /* NLS crap */ |
| 31 | #define _(x) x |
Mike Frysinger | ba3a01f | 2005-05-07 06:49:54 +0000 | [diff] [blame] | 32 | #define N_(x) x |
Mike Frysinger | d89e629 | 2005-04-24 05:07:59 +0000 | [diff] [blame] | 33 | |
| 34 | /* misc crap */ |
Mike Frysinger | d89e629 | 2005-04-24 05:07:59 +0000 | [diff] [blame] | 35 | #define fatal_error(msg, err) bb_error_msg_and_die(msg) |
| 36 | #define usage() bb_show_usage() |
| 37 | #define perror(msg) bb_perror_msg(msg) |
| 38 | |
| 39 | #endif /* __E2FSBB_H__ */ |