From cd5aa5c5dac87a51331b03ee08582e18f489a328 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Fri, 18 Jun 2010 11:47:45 +0200 Subject: mkfs_ext2: fix handling of -I argument -I but was treated as a character Signed-off-by: Bernhard Reutner-Fischer --- util-linux/mkfs_ext2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util-linux') diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c index fd54734fc..388bd7b88 100644 --- a/util-linux/mkfs_ext2.c +++ b/util-linux/mkfs_ext2.c @@ -210,7 +210,7 @@ int mkfs_ext2_main(int argc UNUSED_PARAM, char **argv) // using global "option_mask32" instead of local "opts": // we are register starved here - opt_complementary = "-1:b+:m+:i+"; + opt_complementary = "-1:b+:i+:I+:m+"; /*opts =*/ getopt32(argv, "cl:b:f:i:I:J:G:N:m:o:g:L:M:O:r:E:T:U:jnqvFS", NULL, &bs, NULL, &bpi, &user_inodesize, NULL, NULL, NULL, &reserved_percent, NULL, NULL, &label, NULL, NULL, NULL, NULL, NULL, NULL); -- cgit v1.2.3 From 5070124763a96d36b94b2a2e58df27ada3623cb8 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Fri, 18 Jun 2010 11:49:44 +0200 Subject: mkfs_ext2: reuse string function old new delta mkfs_ext2_main 2376 2378 +2 .rodata 135872 135848 -24 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 2/-24) Total: -22 bytes Signed-off-by: Bernhard Reutner-Fischer --- util-linux/mkfs_ext2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util-linux') diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c index 388bd7b88..1748a475c 100644 --- a/util-linux/mkfs_ext2.c +++ b/util-linux/mkfs_ext2.c @@ -220,7 +220,7 @@ int mkfs_ext2_main(int argc UNUSED_PARAM, char **argv) xmove_fd(xopen(argv[0], O_WRONLY), fd); fstat(fd, &st); if (!S_ISBLK(st.st_mode) && !(option_mask32 & OPT_F)) - bb_error_msg_and_die("not a block device"); + bb_error_msg_and_die("%s: not a block device", argv[0]); // check if it is mounted // N.B. what if we format a file? find_mount_point will return false negative since -- cgit v1.2.3 From 8f599f9a310b07b482eac1fd67e8c8a1c7a53124 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 18 Jun 2010 12:40:57 +0200 Subject: mkfs_ext2: improve comments a bit Signed-off-by: Denys Vlasenko --- util-linux/mkfs_ext2.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'util-linux') diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c index 1748a475c..14feb9288 100644 --- a/util-linux/mkfs_ext2.c +++ b/util-linux/mkfs_ext2.c @@ -140,7 +140,7 @@ static void PUT(uint64_t off, void *buf, uint32_t size) // only for directories, which never need i_size_high). // // Standard mke2fs creates a filesystem with 256-byte inodes if it is -// bigger than 0.5GB. So far, we do not do this. +// bigger than 0.5GB. // Standard mke2fs 1.41.9: // Usage: mke2fs [-c|-l filename] [-b block-size] [-f fragment-size] @@ -212,8 +212,11 @@ int mkfs_ext2_main(int argc UNUSED_PARAM, char **argv) // we are register starved here opt_complementary = "-1:b+:i+:I+:m+"; /*opts =*/ getopt32(argv, "cl:b:f:i:I:J:G:N:m:o:g:L:M:O:r:E:T:U:jnqvFS", - NULL, &bs, NULL, &bpi, &user_inodesize, NULL, NULL, NULL, - &reserved_percent, NULL, NULL, &label, NULL, NULL, NULL, NULL, NULL, NULL); + /*lbfi:*/ NULL, &bs, NULL, &bpi, + /*IJGN:*/ &user_inodesize, NULL, NULL, NULL, + /*mogL:*/ &reserved_percent, NULL, NULL, &label, + /*MOrE:*/ NULL, NULL, NULL, NULL, + /*TU:*/ NULL, NULL); argv += optind; // argv[0] -- device // open the device, check the device is a block device -- cgit v1.2.3 From eafc6956f6fa86cb7d4bf488e96eeee34c551819 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Thu, 17 Jun 2010 23:30:27 -0700 Subject: Allow CONFIG_VOLUMEID to be turned off Signed-off-by: Dan Fandrich Signed-off-by: Denys Vlasenko --- util-linux/Config.src | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'util-linux') diff --git a/util-linux/Config.src b/util-linux/Config.src index e97125917..3c3e05ec4 100644 --- a/util-linux/Config.src +++ b/util-linux/Config.src @@ -472,7 +472,7 @@ config FEATURE_USE_TERMIOS config VOLUMEID bool #No description makes it a hidden option - default y + default n config FEATURE_VOLUMEID_EXT bool "Ext filesystem" @@ -725,7 +725,7 @@ config FEATURE_MOUNT_HELPERS The idea is to use such virtual filesystems in /etc/fstab. config FEATURE_MOUNT_LABEL - bool "Support specifiying devices by label or UUID" + bool "Support specifying devices by label or UUID" default y depends on MOUNT select VOLUMEID @@ -930,7 +930,7 @@ config FEATURE_MTAB_SUPPORT If you must use this, keep in mind it's inherently brittle (for example a mount under chroot won't update it), can't handle modern features like separate per-process filesystem namespaces, requires - that your /etc directory be writeable, tends to get easily confused + that your /etc directory be writable, tends to get easily confused by --bind or --move mounts, won't update if you rename a directory that contains a mount point, and so on. (In brief: avoid.) -- cgit v1.2.3 From b87c17cd16f1b23a07a65ee90a3e30a49992fa51 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 18 Jun 2010 15:15:24 +0200 Subject: *: stop defining _GNU_SOURCE in source files, it's in CFLAGS anyway Signed-off-by: Denys Vlasenko --- e2fsprogs/old_e2fsprogs/e2fsck.c | 4 ---- libbb/get_line_from_file.c | 5 ----- modutils/depmod.c | 2 -- shell/ash.c | 6 ------ util-linux/hwclock.c | 7 ------- 5 files changed, 24 deletions(-) (limited to 'util-linux') diff --git a/e2fsprogs/old_e2fsprogs/e2fsck.c b/e2fsprogs/old_e2fsprogs/e2fsck.c index 7384bc453..4c4c78d00 100644 --- a/e2fsprogs/old_e2fsprogs/e2fsck.c +++ b/e2fsprogs/old_e2fsprogs/e2fsck.c @@ -29,10 +29,6 @@ * Licensed under GPLv2 or later, see file License in this tarball for details. */ -#ifndef _GNU_SOURCE -#define _GNU_SOURCE 1 /* get strnlen() */ -#endif - #include "e2fsck.h" /*Put all of our defines here to clean things up*/ #define _(x) x diff --git a/libbb/get_line_from_file.c b/libbb/get_line_from_file.c index 3cb46d240..cbfb45b7c 100644 --- a/libbb/get_line_from_file.c +++ b/libbb/get_line_from_file.c @@ -9,11 +9,6 @@ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ -/* for getline() [GNUism] -#ifndef _GNU_SOURCE -#define _GNU_SOURCE 1 -#endif -*/ #include "libbb.h" /* This function reads an entire line from a text file, up to a newline diff --git a/modutils/depmod.c b/modutils/depmod.c index 4718c4dcb..c734f142b 100644 --- a/modutils/depmod.c +++ b/modutils/depmod.c @@ -8,8 +8,6 @@ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ -#undef _GNU_SOURCE -#define _GNU_SOURCE #include "libbb.h" #include "modutils.h" #include /* uname() */ diff --git a/shell/ash.c b/shell/ash.c index 74fe8617b..171740768 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -36,12 +36,6 @@ #define JOBS ENABLE_ASH_JOB_CONTROL -#if DEBUG -# ifndef _GNU_SOURCE -# define _GNU_SOURCE -# endif -#endif - #include "busybox.h" /* for applet_names */ #include #include diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c index 416271b31..3da2e23c3 100644 --- a/util-linux/hwclock.c +++ b/util-linux/hwclock.c @@ -12,13 +12,6 @@ #include #include "rtc_.h" -#if ENABLE_FEATURE_HWCLOCK_LONG_OPTIONS -# ifndef _GNU_SOURCE -# define _GNU_SOURCE -# endif -#endif - - /* diff code is disabled: it's not sys/hw clock diff, it's some useless * "time between hwclock was started and we saw CMOS tick" quantity. * It's useless since hwclock is started at a random moment, -- cgit v1.2.3