[PATCH 2/2] e2fsprogs: Do not use linux/ext2_fs.h header
Thierry Reding
thierry.reding at avionic-design.de
Thu Mar 22 07:10:25 UTC 2012
This header should not be used by user space programs and in fact will
probably no longer be exported in future versions of the Linux kernel.
See this thread for reference:
https://lkml.org/lkml/2012/3/21/516
All required definitions are already contained in busybox' own copy of
this header, e2fs_defs.h, so the include can just be replaced. While at
it, this patch moves the mkfs_ext2 applet from util-linux to e2fsprogs
to mirror upstream behaviour and to avoid having to include e2fs_defs.h
via a relative path.
Signed-off-by: Thierry Reding <thierry.reding at avionic-design.de>
---
e2fsprogs/Config.src | 7 +++++++
e2fsprogs/Kbuild.src | 5 +++--
{util-linux => e2fsprogs}/mkfs_ext2.c | 2 +-
e2fsprogs/tune2fs.c | 2 +-
util-linux/Config.src | 7 -------
util-linux/Kbuild.src | 1 -
6 files changed, 12 insertions(+), 12 deletions(-)
rename {util-linux => e2fsprogs}/mkfs_ext2.c (99%)
diff --git a/e2fsprogs/Config.src b/e2fsprogs/Config.src
index 743e1e1..8f57fc6 100644
--- a/e2fsprogs/Config.src
+++ b/e2fsprogs/Config.src
@@ -44,6 +44,13 @@ config LSATTR
### mke2fs is used to create an ext2/ext3 filesystem. The normal compat
### symlinks 'mkfs.ext2' and 'mkfs.ext3' are also provided.
+config MKFS_EXT2
+ bool "mkfs_ext2"
+ default y
+ select PLATFORM_LINUX
+ help
+ Utility to create EXT2 filesystems.
+
config TUNE2FS
bool "tune2fs"
default n # off: it is too limited compared to upstream version
diff --git a/e2fsprogs/Kbuild.src b/e2fsprogs/Kbuild.src
index b7a14c3..19a022b 100644
--- a/e2fsprogs/Kbuild.src
+++ b/e2fsprogs/Kbuild.src
@@ -11,5 +11,6 @@ INSERT
lib-$(CONFIG_CHATTR) += chattr.o e2fs_lib.o
lib-$(CONFIG_LSATTR) += lsattr.o e2fs_lib.o
-lib-$(CONFIG_FSCK) += fsck.o
-lib-$(CONFIG_TUNE2FS) += tune2fs.o
+lib-$(CONFIG_FSCK) += fsck.o
+lib-$(CONFIG_MKFS_EXT2) += mkfs_ext2.o
+lib-$(CONFIG_TUNE2FS) += tune2fs.o
diff --git a/util-linux/mkfs_ext2.c b/e2fsprogs/mkfs_ext2.c
similarity index 99%
rename from util-linux/mkfs_ext2.c
rename to e2fsprogs/mkfs_ext2.c
index 6cbbe0e..ef810de 100644
--- a/util-linux/mkfs_ext2.c
+++ b/e2fsprogs/mkfs_ext2.c
@@ -48,7 +48,7 @@
#include "libbb.h"
#include <linux/fs.h>
-#include <linux/ext2_fs.h>
+#include "e2fs_defs.h"
#define ENABLE_FEATURE_MKFS_EXT2_RESERVED_GDT 0
#define ENABLE_FEATURE_MKFS_EXT2_DIR_INDEX 1
diff --git a/e2fsprogs/tune2fs.c b/e2fsprogs/tune2fs.c
index 020bdaa..e67e94e 100644
--- a/e2fsprogs/tune2fs.c
+++ b/e2fsprogs/tune2fs.c
@@ -8,7 +8,7 @@
*/
#include "libbb.h"
#include <linux/fs.h>
-#include <linux/ext2_fs.h>
+#include "e2fs_defs.h"
// storage helpers
char BUG_wrong_field_size(void);
diff --git a/util-linux/Config.src b/util-linux/Config.src
index 57a52ce..df0f252 100644
--- a/util-linux/Config.src
+++ b/util-linux/Config.src
@@ -246,13 +246,6 @@ config FSCK_MINIX
check for and attempt to repair any corruption that occurs to a minix
filesystem.
-config MKFS_EXT2
- bool "mkfs_ext2"
- default y
- select PLATFORM_LINUX
- help
- Utility to create EXT2 filesystems.
-
config MKFS_MINIX
bool "mkfs_minix"
default y
diff --git a/util-linux/Kbuild.src b/util-linux/Kbuild.src
index 468fc6b..0fe3107 100644
--- a/util-linux/Kbuild.src
+++ b/util-linux/Kbuild.src
@@ -26,7 +26,6 @@ lib-$(CONFIG_IPCS) += ipcs.o
lib-$(CONFIG_LOSETUP) += losetup.o
lib-$(CONFIG_LSPCI) += lspci.o
lib-$(CONFIG_LSUSB) += lsusb.o
-lib-$(CONFIG_MKFS_EXT2) += mkfs_ext2.o
lib-$(CONFIG_MKFS_MINIX) += mkfs_minix.o
lib-$(CONFIG_MKFS_REISER) += mkfs_reiser.o
lib-$(CONFIG_MKFS_VFAT) += mkfs_vfat.o
--
1.7.9.4
More information about the busybox
mailing list