summaryrefslogtreecommitdiff
path: root/misc/util.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2011-09-28 22:45:12 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-09-28 23:20:56 -0400
commit14b283ae565930144ef5ace12483d602cc3e7539 (patch)
tree39d4f8740b1546c9e925890543c68653003648bf /misc/util.c
parent0dbb256124db6dbc4bc47e00839c07c32dc29637 (diff)
downloade2fsprogs-14b283ae565930144ef5ace12483d602cc3e7539.tar.gz
mke2fs: set s_max_mnt_count to -1 by default
If the enable_periodic_fsck option is false in /etc/mke2fs.conf (which is also the default), s_max_mnt_count needs to be set to -1, instead of 0. Kernels newer than 3.0 will interpret 0 to disable periodic checks, but older kernels will print a warning message on each mount, which will annoy users. Addresses-Debian-Bug: #632637 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'misc/util.c')
-rw-r--r--misc/util.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/misc/util.c b/misc/util.c
index 05334a61..6c93e1c6 100644
--- a/misc/util.c
+++ b/misc/util.c
@@ -278,8 +278,12 @@ unsigned int figure_journal_size(int size, ext2_filsys fs)
return j_blocks;
}
-void print_check_message(unsigned int mnt, unsigned int check)
+void print_check_message(int mnt, unsigned int check)
{
+ if (mnt < 0)
+ mnt = 0;
+ if (!mnt && !check)
+ return;
printf(_("This filesystem will be automatically "
"checked every %d mounts or\n"
"%g days, whichever comes first. "