Changeset View
Changeset View
Standalone View
Standalone View
lib/libsysdecode/flags.c
Show First 20 Lines • Show All 641 Lines • ▼ Show 20 Lines | |||||
bool | bool | ||||
sysdecode_reboot_howto(FILE *fp, int howto, int *rem) | sysdecode_reboot_howto(FILE *fp, int howto, int *rem) | ||||
{ | { | ||||
bool printed; | bool printed; | ||||
/* | /* | ||||
* RB_AUTOBOOT is special in that its value is zero, but it is | * RB_AUTOBOOT is special in that its value is zero, but it is | ||||
* also an implied argument if a different operation is not | * also an implied argument if a different operation is not | ||||
* requested via RB_HALT, RB_POWEROFF, or RB_REROOT. | * requested via RB_HALT, RB_POWERCYCLE, RB_POWEROFF, or RB_REROOT. | ||||
*/ | */ | ||||
if (howto != 0 && (howto & (RB_HALT | RB_POWEROFF | RB_REROOT)) == 0) { | if (howto != 0 && (howto & (RB_HALT | RB_POWEROFF | RB_REROOT | RB_POWERCYCLE)) == 0) { | ||||
dab: Not a big deal, but you might consider putting the flags in the same order here as in the… | |||||
fputs("RB_AUTOBOOT|", fp); | fputs("RB_AUTOBOOT|", fp); | ||||
printed = true; | printed = true; | ||||
} else | } else | ||||
printed = false; | printed = false; | ||||
return (print_mask_int(fp, rebootopt, howto, rem) || printed); | return (print_mask_int(fp, rebootopt, howto, rem) || printed); | ||||
} | } | ||||
bool | bool | ||||
▲ Show 20 Lines • Show All 387 Lines • Show Last 20 Lines |
Not a big deal, but you might consider putting the flags in the same order here as in the comment. It would make it easier to see that the two correspond. Plus, I like alphabetical order. :-)