Question about e2fsck for size otpimization
Bernhard Fischer
rep.nop at aon.at
Tue Oct 11 09:59:11 UTC 2005
On Tue, Oct 11, 2005 at 09:59:43AM +0200, Tito wrote:
>Hi,
>I'm trying to reduce the size of e2fsck and now I'm facing
>a problem as e2fsck uses non standard exit codes:
>
>/*
> * Exit codes used by fsck-type programs
> */
>#define FSCK_OK 0 /* No errors */
>#define FSCK_NONDESTRUCT 1 /* File system errors corrected */
>#define FSCK_REBOOT 2 /* System should be rebooted */
>#define FSCK_UNCORRECTED 4 /* File system errors left uncorrected */
>#define FSCK_ERROR 8 /* Operational error */
>#define FSCK_USAGE 16 /* Usage or syntax error */
>#define FSCK_CANCELED 32 /* Aborted with a signal or ^C */
>#define FSCK_LIBRARY 128 /* Shared library error */
>
>This makes it difficult to use most of the bb_*error_msg_* functions
Why don't you set bb_default_error_retval before you call
bb_error_msg_and_die()? We should really change bb_show_usage to
use bb_default_error_retval instead of the hardcoded failure. Boils down
to the same thing per default..
>and as well bb_show_usage which all exit EXIT_FAILURE (1).
>Are this exit codes mandatory (as I think) or should I Ignore them
>and go with the libbb stuff?
>
>Thanks in advance for your advice.
>
>BTW. size reduction so far is:
>
> text data bss dec hex filename
> 84875 160 576 85611 14e6b e2fsck.o.orig
> 82740 160 576 83476 14614 e2fsck.o
Very nice :)
HTH,
Bernhard
>
>Ciao,
>Tito
>_______________________________________________
>busybox mailing list
>busybox at busybox.net
>http://busybox.net/cgi-bin/mailman/listinfo/busybox
>
More information about the busybox
mailing list