linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] create_inode: don't indiscriminately #include "nls-enable.h"
@ 2014-09-19  5:50 Theodore Ts'o
  2014-09-19  5:50 ` [PATCH 2/4] e2fsck: fix build under dietlibc Theodore Ts'o
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Theodore Ts'o @ 2014-09-19  5:50 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Theodore Ts'o

The create_inode.h header file is pulled in by debugfs, which is not
internationalized.  It had no business pulling in nls-enable.h; that
header file should only be used in specific .c files that support
internationalization.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 misc/create_inode.c | 1 +
 misc/create_inode.h | 1 -
 misc/mke2fs.c       | 1 +
 3 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/misc/create_inode.c b/misc/create_inode.c
index 7f57979..cf7c097 100644
--- a/misc/create_inode.c
+++ b/misc/create_inode.c
@@ -17,6 +17,7 @@
 #endif
 
 #include "create_inode.h"
+#include "nls-enable.h"
 
 #if __STDC_VERSION__ < 199901L
 # if __GNUC__ >= 2
diff --git a/misc/create_inode.h b/misc/create_inode.h
index 067bf96..145fd57 100644
--- a/misc/create_inode.h
+++ b/misc/create_inode.h
@@ -7,7 +7,6 @@
 #include "et/com_err.h"
 #include "e2p/e2p.h"
 #include "ext2fs/ext2fs.h"
-#include "nls-enable.h"
 
 struct hdlink_s
 {
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 69045b2..f09351d 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -58,6 +58,7 @@ extern int optind;
 #include "quota/quotaio.h"
 #include "mke2fs.h"
 #include "create_inode.h"
+#include "nls-enable.h"
 
 #define STRIDE_LENGTH 8
 
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/4] e2fsck: fix build under dietlibc
  2014-09-19  5:50 [PATCH 1/4] create_inode: don't indiscriminately #include "nls-enable.h" Theodore Ts'o
@ 2014-09-19  5:50 ` Theodore Ts'o
  2014-09-19  5:50 ` [PATCH 3/4] Fix build failures due to missing $(SYSLIBS) Theodore Ts'o
  2014-09-19  5:50 ` [PATCH 4/4] e2fsck: use ext2fs_get_mem() instad of ext2fs_get_memalign() Theodore Ts'o
  2 siblings, 0 replies; 4+ messages in thread
From: Theodore Ts'o @ 2014-09-19  5:50 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Theodore Ts'o

The asm_types.h file needs to include stdio.h and stdlib.h in order to
get integer types included.  So add those includes into jfs_user.h to
avoid a build faliure under dietlibc.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 e2fsck/jfs_user.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/e2fsck/jfs_user.h b/e2fsck/jfs_user.h
index adb8ae9..cbc14e8 100644
--- a/e2fsck/jfs_user.h
+++ b/e2fsck/jfs_user.h
@@ -12,6 +12,8 @@
 #define _JFS_USER_H
 
 #ifdef DEBUGFS
+#include <stdio.h>
+#include <stdlib.h>
 #if EXT2_FLAT_INCLUDES
 #include "ext2_fs.h"
 #include "ext2fs.h"
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/4] Fix build failures due to missing $(SYSLIBS)
  2014-09-19  5:50 [PATCH 1/4] create_inode: don't indiscriminately #include "nls-enable.h" Theodore Ts'o
  2014-09-19  5:50 ` [PATCH 2/4] e2fsck: fix build under dietlibc Theodore Ts'o
@ 2014-09-19  5:50 ` Theodore Ts'o
  2014-09-19  5:50 ` [PATCH 4/4] e2fsck: use ext2fs_get_mem() instad of ext2fs_get_memalign() Theodore Ts'o
  2 siblings, 0 replies; 4+ messages in thread
From: Theodore Ts'o @ 2014-09-19  5:50 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Theodore Ts'o

Two link lines were missing $(SYSLIBS), which is needed for dietlibc.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 lib/ext2fs/Makefile.in | 2 +-
 misc/Makefile.in       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/ext2fs/Makefile.in b/lib/ext2fs/Makefile.in
index 45e733c..f155233 100644
--- a/lib/ext2fs/Makefile.in
+++ b/lib/ext2fs/Makefile.in
@@ -476,7 +476,7 @@ tst_inline: $(srcdir)/inline.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
 tst_inline_data: inline_data.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
 	$(E) "	LD $@"
 	$(Q) $(CC) -o tst_inline_data $(srcdir)/inline_data.c $(ALL_CFLAGS) \
-	-DDEBUG $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
+	-DDEBUG $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(SYSLIBS)
 
 tst_csum: csum.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) $(STATIC_LIBE2P) \
 		$(top_srcdir)/lib/e2p/e2p.h
diff --git a/misc/Makefile.in b/misc/Makefile.in
index 0b59c0c..d4a02d3 100644
--- a/misc/Makefile.in
+++ b/misc/Makefile.in
@@ -351,7 +351,7 @@ e2fuzz: $(E2FUZZ_OBJS) $(DEPLIBS) $(DEPLIBBLKID) $(DEPLIBUUID) \
 		$(DEPLIBQUOTA) $(LIBEXT2FS)
 	$(E) "	LD $@"
 	$(Q) $(CC) $(ALL_LDFLAGS) -o e2fuzz $(E2FUZZ_OBJS) $(LIBS) \
-		$(LIBBLKID) $(LIBUUID) $(LIBEXT2FS)
+		$(LIBBLKID) $(LIBUUID) $(LIBEXT2FS) $(SYSLIBS)
 
 filefrag: $(FILEFRAG_OBJS)
 	$(E) "	LD $@"
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 4/4] e2fsck: use ext2fs_get_mem() instad of ext2fs_get_memalign()
  2014-09-19  5:50 [PATCH 1/4] create_inode: don't indiscriminately #include "nls-enable.h" Theodore Ts'o
  2014-09-19  5:50 ` [PATCH 2/4] e2fsck: fix build under dietlibc Theodore Ts'o
  2014-09-19  5:50 ` [PATCH 3/4] Fix build failures due to missing $(SYSLIBS) Theodore Ts'o
@ 2014-09-19  5:50 ` Theodore Ts'o
  2 siblings, 0 replies; 4+ messages in thread
From: Theodore Ts'o @ 2014-09-19  5:50 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Theodore Ts'o

There is no reason to request a aligned buffer in
check_{inode,block}_bitmap, and this will cause failures for dietlibc,
which doesn't have support for posix_memalign() or any other way to
request an aligned memory allocation.  Fortunately, this is only
needed in very few places where direct I/O is required.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 e2fsck/pass5.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/e2fsck/pass5.c b/e2fsck/pass5.c
index 86ac9fd..8d6032b 100644
--- a/e2fsck/pass5.c
+++ b/e2fsck/pass5.c
@@ -99,8 +99,7 @@ static void check_inode_bitmap_checksum(e2fsck_t ctx)
 		return;
 
 	nbytes = (size_t)(EXT2_INODES_PER_GROUP(ctx->fs->super) / 8);
-	retval = ext2fs_get_memalign(ctx->fs->blocksize, ctx->fs->blocksize,
-				     &buf);
+	retval = ext2fs_get_mem(ctx->fs->blocksize, &buf);
 	if (retval) {
 		com_err(ctx->program_name, 0, "%s",
 		    _("check_inode_bitmap_checksum: Memory allocation error"));
@@ -155,8 +154,7 @@ static void check_block_bitmap_checksum(e2fsck_t ctx)
 		return;
 
 	nbytes = (size_t)(EXT2_CLUSTERS_PER_GROUP(ctx->fs->super) / 8);
-	retval = ext2fs_get_memalign(ctx->fs->blocksize, ctx->fs->blocksize,
-				     &buf);
+	retval = ext2fs_get_mem(ctx->fs->blocksize, &buf);
 	if (retval) {
 		com_err(ctx->program_name, 0, "%s",
 		    _("check_block_bitmap_checksum: Memory allocation error"));
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-19  5:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-19  5:50 [PATCH 1/4] create_inode: don't indiscriminately #include "nls-enable.h" Theodore Ts'o
2014-09-19  5:50 ` [PATCH 2/4] e2fsck: fix build under dietlibc Theodore Ts'o
2014-09-19  5:50 ` [PATCH 3/4] Fix build failures due to missing $(SYSLIBS) Theodore Ts'o
2014-09-19  5:50 ` [PATCH 4/4] e2fsck: use ext2fs_get_mem() instad of ext2fs_get_memalign() Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).