[systemd-devel] [PATCH] fsck: define fsck return codes
Lennart Poettering
lennart at poettering.net
Tue May 12 09:17:42 PDT 2015
On Tue, 12.05.15 01:00, Lennart Poettering (lennart at poettering.net) wrote:
> On Tue, 12.05.15 00:58, Thomas H.P. Andersen (phomes at gmail.com) wrote:
> >
> > +#define FSCK_NO_ERROR 0
> > +#define FSCK_ERROR_CORRECTED 1
> > +#define FSCK_SYSTEM_SHOULD_REBOOT 2
> > +#define FSCK_ERRORS_LEFT_UNCORRECTED 4
> > +#define FSCK_OPERATIONAL_ERROR 8
> > +#define FSCK_USAGE_OR_SYNTAX_ERROR 16
> > +#define FSCK_USER_CANCELLED 32
> > +#define FSCK_SHARED_LIB_ERROR 128
>
> Makes sense, but can you make this an enum? Also, please add a comment
> referencing the documentation in fsck(8) for this.
I mean an anonymous enum btw. I.e. just:
enum {
FSCK_SUCCESS = 0,
FSCK_ERROR_CORRECTED = 1,
FSCK_SYSTEM_SHOULD_REBOOT = 2,
...
};
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list