aboutsummaryrefslogtreecommitdiff
path: root/e2fsprogs
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2015-10-18 22:40:23 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2015-10-18 22:40:23 +0200
commit000eda41c084bae95d9e40a570cbdaa5ffd3d22e (patch)
tree848b2b10ddd0277664e27c777ea36a7f5b317929 /e2fsprogs
parentd34f300db6d7a726759f4d820a61f19eacf11288 (diff)
downloadbusybox-w32-000eda41c084bae95d9e40a570cbdaa5ffd3d22e.tar.gz
busybox-w32-000eda41c084bae95d9e40a570cbdaa5ffd3d22e.tar.bz2
busybox-w32-000eda41c084bae95d9e40a570cbdaa5ffd3d22e.zip
e2fsprogs/*: convert to new-style "one file" applets
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'e2fsprogs')
-rw-r--r--e2fsprogs/Config.src28
-rw-r--r--e2fsprogs/Kbuild.src6
-rw-r--r--e2fsprogs/chattr.c16
-rw-r--r--e2fsprogs/fsck.c11
-rw-r--r--e2fsprogs/lsattr.c16
-rw-r--r--e2fsprogs/tune2fs.c43
6 files changed, 55 insertions, 65 deletions
diff --git a/e2fsprogs/Config.src b/e2fsprogs/Config.src
index 743e1e11f..a20d849e6 100644
--- a/e2fsprogs/Config.src
+++ b/e2fsprogs/Config.src
@@ -7,12 +7,6 @@ menu "Linux Ext2 FS Progs"
7 7
8INSERT 8INSERT
9 9
10config CHATTR
11 bool "chattr"
12 default y
13 help
14 chattr changes the file attributes on a second extended file system.
15
16### config E2FSCK 10### config E2FSCK
17### bool "e2fsck" 11### bool "e2fsck"
18### default y 12### default y
@@ -22,21 +16,6 @@ config CHATTR
22### The normal compat symlinks 'fsck.ext2' and 'fsck.ext3' are also 16### The normal compat symlinks 'fsck.ext2' and 'fsck.ext3' are also
23### provided. 17### provided.
24 18
25config FSCK
26 bool "fsck"
27 default y
28 help
29 fsck is used to check and optionally repair one or more filesystems.
30 In actuality, fsck is simply a front-end for the various file system
31 checkers (fsck.fstype) available under Linux.
32
33config LSATTR
34 bool "lsattr"
35 default y
36 select PLATFORM_LINUX
37 help
38 lsattr lists the file attributes on a second extended file system.
39
40### config MKE2FS 19### config MKE2FS
41### bool "mke2fs" 20### bool "mke2fs"
42### default y 21### default y
@@ -44,13 +23,6 @@ config LSATTR
44### mke2fs is used to create an ext2/ext3 filesystem. The normal compat 23### mke2fs is used to create an ext2/ext3 filesystem. The normal compat
45### symlinks 'mkfs.ext2' and 'mkfs.ext3' are also provided. 24### symlinks 'mkfs.ext2' and 'mkfs.ext3' are also provided.
46 25
47config TUNE2FS
48 bool "tune2fs"
49 default n # off: it is too limited compared to upstream version
50 help
51 tune2fs allows the system administrator to adjust various tunable
52 filesystem parameters on Linux ext2/ext3 filesystems.
53
54### config E2LABEL 26### config E2LABEL
55### bool "e2label" 27### bool "e2label"
56### default y 28### default y
diff --git a/e2fsprogs/Kbuild.src b/e2fsprogs/Kbuild.src
index b7a14c381..6b4fb7470 100644
--- a/e2fsprogs/Kbuild.src
+++ b/e2fsprogs/Kbuild.src
@@ -7,9 +7,3 @@
7lib-y:= 7lib-y:=
8 8
9INSERT 9INSERT
10
11lib-$(CONFIG_CHATTR) += chattr.o e2fs_lib.o
12lib-$(CONFIG_LSATTR) += lsattr.o e2fs_lib.o
13
14lib-$(CONFIG_FSCK) += fsck.o
15lib-$(CONFIG_TUNE2FS) += tune2fs.o
diff --git a/e2fsprogs/chattr.c b/e2fsprogs/chattr.c
index f1cc8389f..c4e2415f8 100644
--- a/e2fsprogs/chattr.c
+++ b/e2fsprogs/chattr.c
@@ -9,15 +9,15 @@
9 * This file can be redistributed under the terms of the GNU General 9 * This file can be redistributed under the terms of the GNU General
10 * Public License 10 * Public License
11 */ 11 */
12//config:config CHATTR
13//config: bool "chattr"
14//config: default y
15//config: help
16//config: chattr changes the file attributes on a second extended file system.
12 17
13/* 18//applet:IF_CHATTR(APPLET(chattr, BB_DIR_BIN, BB_SUID_DROP))
14 * History: 19
15 * 93/10/30 - Creation 20//kbuild:lib-$(CONFIG_CHATTR) += chattr.o e2fs_lib.o
16 * 93/11/13 - Replace stat() calls by lstat() to avoid loops
17 * 94/02/27 - Integrated in Ted's distribution
18 * 98/12/29 - Ignore symlinks when working recursively (G M Sipe)
19 * 98/12/29 - Display version info only when -V specified (G M Sipe)
20 */
21 21
22//usage:#define chattr_trivial_usage 22//usage:#define chattr_trivial_usage
23//usage: "[-R] [-+=AacDdijsStTu] [-v VERSION] [FILE]..." 23//usage: "[-R] [-+=AacDdijsStTu] [-v VERSION] [FILE]..."
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c
index d2d312e5c..adaf0c538 100644
--- a/e2fsprogs/fsck.c
+++ b/e2fsprogs/fsck.c
@@ -33,6 +33,17 @@
33 * spawns actual fsck.something for each filesystem to check. 33 * spawns actual fsck.something for each filesystem to check.
34 * It doesn't guess filesystem types from on-disk format. 34 * It doesn't guess filesystem types from on-disk format.
35 */ 35 */
36//config:config FSCK
37//config: bool "fsck"
38//config: default y
39//config: help
40//config: fsck is used to check and optionally repair one or more filesystems.
41//config: In actuality, fsck is simply a front-end for the various file system
42//config: checkers (fsck.fstype) available under Linux.
43
44//applet:IF_FSCK(APPLET(fsck, BB_DIR_SBIN, BB_SUID_DROP))
45
46//kbuild:lib-$(CONFIG_FSCK) += fsck.o
36 47
37//usage:#define fsck_trivial_usage 48//usage:#define fsck_trivial_usage
38//usage: "[-ANPRTV] [-C FD] [-t FSTYPE] [FS_OPTS] [BLOCKDEV]..." 49//usage: "[-ANPRTV] [-C FD] [-t FSTYPE] [FS_OPTS] [BLOCKDEV]..."
diff --git a/e2fsprogs/lsattr.c b/e2fsprogs/lsattr.c
index 1312fe754..3a7dd6b56 100644
--- a/e2fsprogs/lsattr.c
+++ b/e2fsprogs/lsattr.c
@@ -9,14 +9,16 @@
9 * This file can be redistributed under the terms of the GNU General 9 * This file can be redistributed under the terms of the GNU General
10 * Public License 10 * Public License
11 */ 11 */
12//config:config LSATTR
13//config: bool "lsattr"
14//config: default y
15//config: select PLATFORM_LINUX
16//config: help
17//config: lsattr lists the file attributes on a second extended file system.
12 18
13/* 19//applet:IF_LSATTR(APPLET(lsattr, BB_DIR_BIN, BB_SUID_DROP))
14 * History: 20
15 * 93/10/30 - Creation 21//kbuild:lib-$(CONFIG_LSATTR) += lsattr.o e2fs_lib.o
16 * 93/11/13 - Replace stat() calls by lstat() to avoid loops
17 * 94/02/27 - Integrated in Ted's distribution
18 * 98/12/29 - Display version info only when -V specified (G M Sipe)
19 */
20 22
21//usage:#define lsattr_trivial_usage 23//usage:#define lsattr_trivial_usage
22//usage: "[-Radlv] [FILE]..." 24//usage: "[-Radlv] [FILE]..."
diff --git a/e2fsprogs/tune2fs.c b/e2fsprogs/tune2fs.c
index 46a745ee4..c9f88b39d 100644
--- a/e2fsprogs/tune2fs.c
+++ b/e2fsprogs/tune2fs.c
@@ -6,6 +6,33 @@
6 * 6 *
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config TUNE2FS
10//config: bool "tune2fs"
11//config: default n # off: it is too limited compared to upstream version
12//config: help
13//config: tune2fs allows the system administrator to adjust various tunable
14//config: filesystem parameters on Linux ext2/ext3 filesystems.
15
16//applet:IF_TUNE2FS(APPLET(tune2fs, BB_DIR_SBIN, BB_SUID_DROP))
17
18//kbuild:lib-$(CONFIG_TUNE2FS) += tune2fs.o
19
20//usage:#define tune2fs_trivial_usage
21//usage: "[-c MAX_MOUNT_COUNT] "
22////usage: "[-e errors-behavior] [-g group] "
23//usage: "[-i DAYS] "
24////usage: "[-j] [-J journal-options] [-l] [-s sparse-flag] "
25////usage: "[-m reserved-blocks-percent] [-o [^]mount-options[,...]] "
26////usage: "[-r reserved-blocks-count] [-u user] "
27//usage: "[-C MOUNT_COUNT] "
28//usage: "[-L LABEL] "
29////usage: "[-M last-mounted-dir] [-O [^]feature[,...]] "
30////usage: "[-T last-check-time] [-U UUID] "
31//usage: "BLOCKDEV"
32//usage:
33//usage:#define tune2fs_full_usage "\n\n"
34//usage: "Adjust filesystem options on ext[23] filesystems"
35
9#include "libbb.h" 36#include "libbb.h"
10#include <linux/fs.h> 37#include <linux/fs.h>
11#include "bb_e2fs_defs.h" 38#include "bb_e2fs_defs.h"
@@ -27,22 +54,6 @@ do { \
27#define FETCH_LE32(field) \ 54#define FETCH_LE32(field) \
28 (sizeof(field) == 4 ? SWAP_LE32(field) : BUG_wrong_field_size()) 55 (sizeof(field) == 4 ? SWAP_LE32(field) : BUG_wrong_field_size())
29 56
30//usage:#define tune2fs_trivial_usage
31//usage: "[-c MAX_MOUNT_COUNT] "
32////usage: "[-e errors-behavior] [-g group] "
33//usage: "[-i DAYS] "
34////usage: "[-j] [-J journal-options] [-l] [-s sparse-flag] "
35////usage: "[-m reserved-blocks-percent] [-o [^]mount-options[,...]] "
36////usage: "[-r reserved-blocks-count] [-u user] "
37//usage: "[-C MOUNT_COUNT] "
38//usage: "[-L LABEL] "
39////usage: "[-M last-mounted-dir] [-O [^]feature[,...]] "
40////usage: "[-T last-check-time] [-U UUID] "
41//usage: "BLOCKDEV"
42//usage:
43//usage:#define tune2fs_full_usage "\n\n"
44//usage: "Adjust filesystem options on ext[23] filesystems"
45
46enum { 57enum {
47 OPT_L = 1 << 0, // label 58 OPT_L = 1 << 0, // label
48 OPT_c = 1 << 1, // max mount count 59 OPT_c = 1 << 1, // max mount count