2006-01-29 Theodore Ts'o <tytso@mit.edu>
* unix.c (check_if_skip): When skipping a check due to being on
- battery, print an explanatory message to this effect.
+ battery, print an explanatory message to this effect. Add
+ an e2fsck configuration option defer_check_on_battery
+ which defaults to true. If the configuration option is
+ turned off, then e2fsck will not attempt to defer
+ filesystem checks when the system is running on battery.
(Addresses Debain Bug: #350306)
2006-01-06 Theodore Ts'o <tytso@mit.edu>
unsigned int reason_arg = 0;
long next_check;
int batt = is_on_batt();
-
+ int defer_check_on_battery;
+
+ profile_get_boolean(ctx->profile, "options",
+ "defer_check_on_battery", 0, 1,
+ &defer_check_on_battery);
+ if (!defer_check_on_battery)
+ batt = 0;
+
if ((ctx->options & E2F_OPT_FORCE) || bad_blocks_file ||
cflag || swapfs)
return;