aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-06-11 01:14:09 +0000
committervapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-06-11 01:14:09 +0000
commit200aa305188642ca584c185c1aebefa44b8b5c42 (patch)
treea665b8f329a5b5f186b2d04d6240593cdb3b339c
parente59d107c455372b1dda15a284f66d98bb2cf5c70 (diff)
downloadbusybox-w32-200aa305188642ca584c185c1aebefa44b8b5c42.tar.gz
busybox-w32-200aa305188642ca584c185c1aebefa44b8b5c42.tar.bz2
busybox-w32-200aa305188642ca584c185c1aebefa44b8b5c42.zip
import tune2fs support
git-svn-id: svn://busybox.net/trunk/busybox@10525 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--e2fsprogs/Config.in13
-rw-r--r--e2fsprogs/Makefile.in25
-rw-r--r--include/applets.h9
-rw-r--r--include/usage.h10
4 files changed, 54 insertions, 3 deletions
diff --git a/e2fsprogs/Config.in b/e2fsprogs/Config.in
index a2d9fe8a5..0ffd51746 100644
--- a/e2fsprogs/Config.in
+++ b/e2fsprogs/Config.in
@@ -17,4 +17,17 @@ config CONFIG_LSATTR
17 help 17 help
18 lsattr lists the file attributes on a second extended file system. 18 lsattr lists the file attributes on a second extended file system.
19 19
20config CONFIG_TUNE2FS
21 bool "tune2fs (and e2label/findfs)"
22 default n
23 help
24 tune2fs allows the system administrator to adjust various tunable
25 filesystem parameters on Linux ext2/ext3 filesystems.
26
27 e2label will display or change the filesystem label on the ext2
28 filesystem located on device.
29
30 findfs will search the disks in the system looking for a filesystem
31 which has a label matching label or a UUID equal to uuid.
32
20endmenu 33endmenu
diff --git a/e2fsprogs/Makefile.in b/e2fsprogs/Makefile.in
index 5c69fbeef..196172bcf 100644
--- a/e2fsprogs/Makefile.in
+++ b/e2fsprogs/Makefile.in
@@ -25,13 +25,32 @@ srcdir=$(top_srcdir)/e2fsprogs
25 25
26E2FSPROGS_CFLAGS := -I$(E2FSPROGS_DIR) -include $(E2FSPROGS_DIR)e2fsbb.h 26E2FSPROGS_CFLAGS := -I$(E2FSPROGS_DIR) -include $(E2FSPROGS_DIR)e2fsbb.h
27 27
28E2P_SRC := fgetsetflags.c fgetsetversion.c pf.c iod.c 28BLKID_SRC := cache.c dev.c devname.c devno.c getsize.c llseek.c probe.c \
29 read.c resolve.c save.c tag.c
30BLKID_SRCS := $(patsubst %,blkid/%, $(BLKID_SRC))
31BLKID_OBJS := $(patsubst %.c,%.o, $(BLKID_SRCS))
32
33E2P_SRC := fgetsetflags.c fgetsetversion.c pf.c iod.c mntopts.c \
34 feature.c ls.c uuid.c pe.c ostype.c ps.c hashstr.c
29E2P_SRCS := $(patsubst %,e2p/%, $(E2P_SRC)) 35E2P_SRCS := $(patsubst %,e2p/%, $(E2P_SRC))
30E2P_OBJS := $(patsubst %.c,%.o, $(E2P_SRCS)) 36E2P_OBJS := $(patsubst %.c,%.o, $(E2P_SRCS))
31 37
38EXT2FS_SRC := gen_bitmap.c bitops.c ismounted.c mkjournal.c unix_io.c \
39 llseek.c rw_bitmaps.c initialize.c bitmaps.c block.c \
40 ind_block.c inode.c freefs.c alloc_stats.c closefs.c \
41 openfs.c io_manager.c finddev.c read_bb.c alloc.c badblocks.c
42EXT2FS_SRCS := $(patsubst %,ext2fs/%, $(EXT2FS_SRC))
43EXT2FS_OBJS := $(patsubst %.c,%.o, $(EXT2FS_SRCS))
44
45UUID_SRC := compare.c gen_uuid.c pack.c parse.c unpack.c unparse.c \
46 uuid_time.c
47UUID_SRCS := $(patsubst %,uuid/%, $(UUID_SRC))
48UUID_OBJS := $(patsubst %.c,%.o, $(UUID_SRCS))
49
32E2FSPROGS-:= 50E2FSPROGS-:=
33E2FSPROGS-$(CONFIG_CHATTR) += chattr.o $(E2P_OBJS) 51E2FSPROGS-$(CONFIG_CHATTR) += chattr.o $(E2P_OBJS)
34E2FSPROGS-$(CONFIG_LSATTR) += lsattr.o $(E2P_OBJS) 52E2FSPROGS-$(CONFIG_LSATTR) += lsattr.o $(E2P_OBJS)
53E2FSPROGS-$(CONFIG_TUNE2FS) += tune2fs.o util.o $(E2P_OBJS) $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS)
35 54
36libraries-y+=$(E2FSPROGS_DIR)$(E2FSPROGS_AR) 55libraries-y+=$(E2FSPROGS_DIR)$(E2FSPROGS_AR)
37 56
diff --git a/include/applets.h b/include/applets.h
index 6aa67f527..d6e767dbf 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -179,6 +179,9 @@
179#ifdef CONFIG_DUMPLEASES 179#ifdef CONFIG_DUMPLEASES
180 APPLET(dumpleases, dumpleases_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) 180 APPLET(dumpleases, dumpleases_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
181#endif 181#endif
182#ifdef CONFIG_TUNE2FS
183 APPLET_NOUSAGE("e2label", tune2fs_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
184#endif
182#ifdef CONFIG_ECHO 185#ifdef CONFIG_ECHO
183 APPLET(echo, echo_main, _BB_DIR_BIN, _BB_SUID_NEVER) 186 APPLET(echo, echo_main, _BB_DIR_BIN, _BB_SUID_NEVER)
184#endif 187#endif
@@ -221,6 +224,9 @@
221#ifdef CONFIG_FIND 224#ifdef CONFIG_FIND
222 APPLET(find, find_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) 225 APPLET(find, find_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
223#endif 226#endif
227#ifdef CONFIG_TUNE2FS
228 APPLET_NOUSAGE("findfs", tune2fs_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
229#endif
224#ifdef CONFIG_FOLD 230#ifdef CONFIG_FOLD
225 APPLET(fold, fold_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) 231 APPLET(fold, fold_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
226#endif 232#endif
@@ -629,6 +635,9 @@
629#ifdef CONFIG_TTY 635#ifdef CONFIG_TTY
630 APPLET(tty, tty_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) 636 APPLET(tty, tty_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
631#endif 637#endif
638#ifdef CONFIG_TUNE2FS
639 APPLET(tune2fs, tune2fs_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
640#endif
632#ifdef CONFIG_UDHCPC 641#ifdef CONFIG_UDHCPC
633 APPLET(udhcpc, udhcpc_main, _BB_DIR_SBIN, _BB_SUID_NEVER) 642 APPLET(udhcpc, udhcpc_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
634#endif 643#endif
diff --git a/include/usage.h b/include/usage.h
index 484c01591..1ab728f26 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -2828,6 +2828,16 @@
2828 "$ tty\n" \ 2828 "$ tty\n" \
2829 "/dev/tty2\n" 2829 "/dev/tty2\n"
2830 2830
2831#define tune2fs_trivial_usage \
2832 "[-c max-mounts-count] [-e errors-behavior] [-g group] " \
2833 "[-i interval[d|m|w]] [-j] [-J journal-options] [-l] [-s sparse-flag] " \
2834 "[-m reserved-blocks-percent] [-o [^]mount-options[,...]] " \
2835 "[-r reserved-blocks-count] [-u user] [-C mount-count] " \
2836 "[-L volume-label] [-M last-mounted-dir] [-O [^]feature[,...]] " \
2837 "[-T last-check-time] [-U UUID] device"
2838#define tune2fs_full_usage \
2839 "Adjust filesystem options on ext[23] filesystems.\n\n"
2840
2831#define udhcpc_trivial_usage \ 2841#define udhcpc_trivial_usage \
2832 "[-fbnqv] [-c CLIENTID] [-H HOSTNAME] [-i INTERFACE]\n[-p pidfile] [-r IP] [-s script]" 2842 "[-fbnqv] [-c CLIENTID] [-H HOSTNAME] [-i INTERFACE]\n[-p pidfile] [-r IP] [-s script]"
2833#define udhcpc_full_usage \ 2843#define udhcpc_full_usage \