import tune2fs support
authorMike Frysinger <vapier@gentoo.org>
Sat, 11 Jun 2005 01:14:09 +0000 (01:14 -0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 11 Jun 2005 01:14:09 +0000 (01:14 -0000)
e2fsprogs/Config.in
e2fsprogs/Makefile.in
include/applets.h
include/usage.h

index a2d9fe8a58b085905642eddb43f680b2bf1bf746..0ffd51746c7956b95a29ce4657412d99d0e1bc88 100644 (file)
@@ -17,4 +17,17 @@ config CONFIG_LSATTR
        help
          lsattr lists the file attributes on a second extended file system.
 
+config CONFIG_TUNE2FS
+       bool "tune2fs (and e2label/findfs)"
+       default n
+       help
+         tune2fs allows the system administrator to adjust various tunable 
+         filesystem parameters on Linux ext2/ext3 filesystems.
+
+         e2label will display or change the filesystem label on the ext2 
+         filesystem located on device.
+
+         findfs will search the disks in the system looking for a filesystem 
+         which has a label matching label or a UUID equal to uuid.
+
 endmenu
index 5c69fbeefe4bb7c8df430402cda7893df062837a..196172bcf7ce38c7b7057fdf53202045efdd504e 100644 (file)
@@ -25,13 +25,32 @@ srcdir=$(top_srcdir)/e2fsprogs
 
 E2FSPROGS_CFLAGS := -I$(E2FSPROGS_DIR) -include $(E2FSPROGS_DIR)e2fsbb.h
 
-E2P_SRC     := fgetsetflags.c fgetsetversion.c pf.c iod.c
+BLKID_SRC   := cache.c dev.c devname.c devno.c getsize.c llseek.c probe.c \
+               read.c resolve.c save.c tag.c
+BLKID_SRCS  := $(patsubst %,blkid/%, $(BLKID_SRC))
+BLKID_OBJS  := $(patsubst %.c,%.o, $(BLKID_SRCS))
+
+E2P_SRC     := fgetsetflags.c fgetsetversion.c pf.c iod.c mntopts.c \
+               feature.c ls.c uuid.c pe.c ostype.c ps.c hashstr.c
 E2P_SRCS    := $(patsubst %,e2p/%, $(E2P_SRC))
 E2P_OBJS    := $(patsubst %.c,%.o, $(E2P_SRCS))
 
+EXT2FS_SRC  := gen_bitmap.c bitops.c ismounted.c mkjournal.c unix_io.c \
+               llseek.c rw_bitmaps.c initialize.c bitmaps.c block.c \
+               ind_block.c inode.c freefs.c alloc_stats.c closefs.c \
+               openfs.c io_manager.c finddev.c read_bb.c alloc.c badblocks.c
+EXT2FS_SRCS := $(patsubst %,ext2fs/%, $(EXT2FS_SRC))
+EXT2FS_OBJS := $(patsubst %.c,%.o, $(EXT2FS_SRCS))
+
+UUID_SRC    := compare.c gen_uuid.c pack.c parse.c unpack.c unparse.c \
+               uuid_time.c
+UUID_SRCS   := $(patsubst %,uuid/%, $(UUID_SRC))
+UUID_OBJS   := $(patsubst %.c,%.o, $(UUID_SRCS))
+
 E2FSPROGS-:=
-E2FSPROGS-$(CONFIG_CHATTR)      += chattr.o $(E2P_OBJS)
-E2FSPROGS-$(CONFIG_LSATTR)      += lsattr.o $(E2P_OBJS)
+E2FSPROGS-$(CONFIG_CHATTR)     += chattr.o $(E2P_OBJS)
+E2FSPROGS-$(CONFIG_LSATTR)     += lsattr.o $(E2P_OBJS)
+E2FSPROGS-$(CONFIG_TUNE2FS)    += tune2fs.o util.o $(E2P_OBJS) $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS)
 
 libraries-y+=$(E2FSPROGS_DIR)$(E2FSPROGS_AR)
 
index 6aa67f527e15c03f862fab7009d0d4a72a4c5960..d6e767dbfbac3cf9bf6deddc6dab6bfd99874a0e 100644 (file)
 #ifdef CONFIG_DUMPLEASES
        APPLET(dumpleases, dumpleases_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
 #endif
+#ifdef CONFIG_TUNE2FS
+       APPLET_NOUSAGE("e2label", tune2fs_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
+#endif
 #ifdef CONFIG_ECHO
        APPLET(echo, echo_main, _BB_DIR_BIN, _BB_SUID_NEVER)
 #endif
 #ifdef CONFIG_FIND
        APPLET(find, find_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
 #endif
+#ifdef CONFIG_TUNE2FS
+       APPLET_NOUSAGE("findfs", tune2fs_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
+#endif
 #ifdef CONFIG_FOLD
        APPLET(fold, fold_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
 #endif
 #ifdef CONFIG_TTY
        APPLET(tty, tty_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
 #endif
+#ifdef CONFIG_TUNE2FS
+       APPLET(tune2fs, tune2fs_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
+#endif
 #ifdef CONFIG_UDHCPC
        APPLET(udhcpc, udhcpc_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
 #endif
index 484c01591748c32d3a7267a59e285d461254a1a4..1ab728f269437921fd05de4a65fb9f156e7e8101 100644 (file)
        "$ tty\n" \
        "/dev/tty2\n"
 
+#define tune2fs_trivial_usage \
+       "[-c max-mounts-count] [-e errors-behavior] [-g group] " \
+       "[-i interval[d|m|w]] [-j] [-J journal-options] [-l] [-s sparse-flag] " \
+       "[-m reserved-blocks-percent] [-o [^]mount-options[,...]] " \
+       "[-r reserved-blocks-count] [-u user] [-C mount-count] " \
+       "[-L volume-label] [-M last-mounted-dir] [-O [^]feature[,...]] " \
+       "[-T last-check-time] [-U UUID] device"
+#define tune2fs_full_usage \
+       "Adjust filesystem options on ext[23] filesystems.\n\n"
+
 #define udhcpc_trivial_usage \
        "[-fbnqv] [-c CLIENTID] [-H HOSTNAME] [-i INTERFACE]\n[-p pidfile] [-r IP] [-s script]"
 #define udhcpc_full_usage \