[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#401426: partconf: useless defaults word in /etc/fstab



Package: partconf
Version: 1.19
Severity: wishlist

The "defaults" word in /etc/fstab exist so that one has something to write
as a 4th field, but it's really useless if there are more options. In such
cases it may be removed safely.

In most cases, removing this extra word makes fstab more readable, as
fields 5 and 6 are closer to the same fields in previous and next lines.

Before:

proc            /proc           proc    defaults        0       0
/dev/hda5       /               ext3    defaults,errors=remount-ro 0       1
/dev/hda3       none            swap    sw              0       0

After:

proc            /proc           proc    defaults        0       0
/dev/hda5       /               ext3    errors=remount-ro 0       1
/dev/hda3       none            swap    sw              0       0

Suggested patch:

diff -ru partconf-1.19.orig/mkfstab.c partconf-1.19/mkfstab.c
--- partconf-1.19.orig/mkfstab.c	2006-07-26 00:52:11.000000000 +0200
+++ partconf-1.19/mkfstab.c	2006-12-03 13:46:03.044507210 +0100
@@ -93,7 +93,7 @@
 	} else {
 		if((strcmp(dummy->mountpoint, "/") == 0) &&
 		  ((strcmp(dummy->typ, "ext2") == 0) || (strcmp(dummy->typ, "ext3") == 0))) {
-			dummy->options = strdup("defaults,errors=remount-ro");
+			dummy->options = strdup("errors=remount-ro");
 		} else {
 			dummy->options = strdup("defaults");
 		}

Thanks.



Reply to: