f2fs-tools: convert to lseek() and kill lseek64
PATCH 1/1 f2fs-tools: convert to lseek() and kill lseek64
From: Waldemar Brodkorb <[email protected]>
This patch replaces lseek64 with lseek() having #define _FILE_OFFSET_BITS 64.
Signed-off-by Waldemar Brodkorb <[email protected]>
Signed-off-by Jaegeuk Kim <[email protected]>
--- configure.ac | 2 -- fsck/Makefile.am | 2 +- include/android_config.h | 4 ---- lib/Makefile.am | 2 +- lib/libf2fs.c | 3 --- lib/libf2fs_io.c | 47 +++++++++++++++------------------------ lib/libf2fs_zoned.c | 1 - mkfs/Makefile.am | 4 ++-- mkfs/f2fs_format.c | 2 -- mkfs/f2fs_format_main.c | 2 -- mkfs/f2fs_format_utils.c | 10 --------- mkfs/f2fs_format_utils.h | 2 -- tools/Makefile.am | 2 +- tools/f2fs_io/Makefile.am | 2 +- tools/f2fs_io/f2fs_io.c | 6 ----- tools/f2fs_io_parse.c | 1 - tools/f2fscrypt.c | 9 -------- tools/fibmap.c | 7 ------ 18 files changed, 24 insertions(+), 84 deletions(-)
configure.ac +0 -2
@@ -187,8 +187,6 @@ AC_CHECK_FUNCS_ONCE([ getmntent getuid keyctl - llseek - lseek64 memset setmntent clock_gettime
fsck/Makefile.am +1 -1
@@ -1,7 +1,7 @@ ## Makefile.am AM_CPPFLAGS = ${libuuid_CFLAGS} -I$(top_srcdir)/include -AM_CFLAGS = -Wall +AM_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64 sbin_PROGRAMS = fsck.f2fs noinst_HEADERS = common.h dict.h dqblk_v2.h f2fs.h fsck.h node.h quotaio.h \ quotaio_tree.h quotaio_v2.h xattr.h compress.h
include/android_config.h +0 -4
@@ -30,8 +30,6 @@#define HAVE_FSTAT 1#define HAVE_FSTAT64 1#define HAVE_GETMNTENT 1 -#define HAVE_LLSEEK 1 -#define HAVE_LSEEK64 1#define HAVE_MEMSET 1#define HAVE_SELINUX_ANDROID_H 1#define HAVE_SETMNTENT 1
@@ -67,7 +65,6 @@#define HAVE_FSTAT 1#define HAVE_FSTAT64 1#define HAVE_GETMNTENT 1 -#define HAVE_LLSEEK 1#define HAVE_MEMSET 1#define HAVE_SPARSE_SPARSE_H 1#define HAVE_LIBLZ4 1
@@ -78,6 +75,5 @@#endif #if defined(_WIN32) -#define HAVE_LSEEK64 #define HAVE_SPARSE_SPARSE_H 1#endif
lib/Makefile.am +1 -1
@@ -3,7 +3,7 @@ lib_LTLIBRARIES = libf2fs.la libf2fs_la_SOURCES = libf2fs.c libf2fs_io.c libf2fs_zoned.c nls_utf8.c -libf2fs_la_CFLAGS = -Wall +libf2fs_la_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64 libf2fs_la_CPPFLAGS = -I$(top_srcdir)/include libf2fs_la_LDFLAGS = -version-info $(LIBF2FS_CURRENT):$(LIBF2FS_REVISION):$(LIBF2FS_AGE)
lib/libf2fs.c +0 -3
@@ -6,9 +6,6 @@* * Dual licensed under the GPL or LGPL version 2 licenses. */ -#define _LARGEFILE64_SOURCE -#define _FILE_OFFSET_BITS 64 -#include <f2fs_fs.h> #include <stdio.h> #include <stdlib.h>
lib/libf2fs_io.c +18 -29
137 lines not on this page · raw message
lib/libf2fs_zoned.c +0 -1
@@ -6,7 +6,6 @@* * Dual licensed under the GPL or LGPL version 2 licenses. */ -#define _LARGEFILE64_SOURCE#include <f2fs_fs.h> #include <stdio.h>
mkfs/Makefile.am +2 -2
@@ -1,7 +1,7 @@ ## Makefile.am AM_CPPFLAGS = ${libuuid_CFLAGS} ${libblkid_CFLAGS} -I$(top_srcdir)/include -AM_CFLAGS = -Wall -DWITH_BLKDISCARD +AM_CFLAGS = -Wall -DWITH_BLKDISCARD -D_FILE_OFFSET_BITS=64 sbin_PROGRAMS = mkfs.f2fs noinst_HEADERS = f2fs_format_utils.h include_HEADERS = $(top_srcdir)/include/f2fs_fs.h
@@ -10,7 +10,7 @@ mkfs_f2fs_LDADD = ${libuuid_LIBS} ${libblkid_LIBS} $(top_builddir)/lib/libf2fs.l lib_LTLIBRARIES = libf2fs_format.la libf2fs_format_la_SOURCES = f2fs_format_main.c f2fs_format.c f2fs_format_utils.c -libf2fs_format_la_CFLAGS = -DWITH_BLKDISCARD +libf2fs_format_la_CFLAGS = -DWITH_BLKDISCARD -D_FILE_OFFSET_BITS=64 libf2fs_format_la_LDFLAGS = ${libblkid_LIBS} ${libuuid_LIBS} -L$(top_builddir)/lib -lf2fs \ -version-info $(FMT_CURRENT):$(FMT_REVISION):$(FMT_AGE)
mkfs/f2fs_format.c +0 -2
@@ -6,8 +6,6 @@* * Dual licensed under the GPL or LGPL version 2 licenses. */ -#define _LARGEFILE64_SOURCE -#include <stdio.h> #include <stdlib.h> #include <fcntl.h>
mkfs/f2fs_format_main.c +0 -2
@@ -6,8 +6,6 @@* * Dual licensed under the GPL or LGPL version 2 licenses. */ -#define _LARGEFILE64_SOURCE -#include <stdio.h> #include <stdlib.h> #include <fcntl.h>
mkfs/f2fs_format_utils.c +0 -10
@@ -6,20 +6,10 @@* * Dual licensed under the GPL or LGPL version 2 licenses. */ -#ifndef _LARGEFILE_SOURCE -#define _LARGEFILE_SOURCE -#endif -#ifndef _LARGEFILE64_SOURCE -#define _LARGEFILE64_SOURCE -#endif #ifndef _GNU_SOURCE#define _GNU_SOURCE#endif -#ifndef _FILE_OFFSET_BITS -#define _FILE_OFFSET_BITS 64 -#endif -#include <f2fs_fs.h> #include <stdio.h>
mkfs/f2fs_format_utils.h +0 -2
@@ -6,8 +6,6 @@* * Dual licensed under the GPL or LGPL version 2 licenses. */ -#define _LARGEFILE64_SOURCE -#include "f2fs_fs.h" extern struct f2fs_configuration c;
tools/Makefile.am +1 -1
@@ -1,7 +1,7 @@ ## Makefile.am AM_CPPFLAGS = ${libuuid_CFLAGS} -I$(top_srcdir)/include -AM_CFLAGS = -Wall +AM_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64 sbin_PROGRAMS = if !WINDOWS sbin_PROGRAMS += fibmap.f2fs parse.f2fs
tools/f2fs_io/Makefile.am +1 -1
@@ -2,7 +2,7 @@ if LINUX AM_CPPFLAGS = -I$(top_srcdir)/include -AM_CFLAGS = -Wall +AM_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64 sbin_PROGRAMS = f2fs_io f2fs_io_SOURCES = f2fs_io.c endif
tools/f2fs_io/f2fs_io.c +0 -6
@@ -9,12 +9,6 @@#ifndef _GNU_SOURCE#define _GNU_SOURCE#endif -#ifndef _LARGEFILE_SOURCE -#define _LARGEFILE_SOURCE -#endif -#ifndef _LARGEFILE64_SOURCE -#define _LARGEFILE64_SOURCE -#endif #ifndef O_LARGEFILE #define O_LARGEFILE 0#endif
tools/f2fs_io_parse.c +0 -1
@@ -8,7 +8,6 @@* it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#define _LARGEFILE64_SOURCE#include <stdio.h> #include <stdlib.h> #include <unistd.h>
tools/f2fscrypt.c +0 -9
@@ -7,15 +7,6 @@* Authors: Michael Halcrow <[email protected]>, * Ildar Muslukhov <[email protected]> */ - -#ifndef _LARGEFILE_SOURCE -#define _LARGEFILE_SOURCE -#endif - -#ifndef _LARGEFILE64_SOURCE -#define _LARGEFILE64_SOURCE -#endif -#ifndef _GNU_SOURCE#define _GNU_SOURCE#endif
tools/fibmap.c +0 -7
@@ -1,13 +1,6 @@#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)#define _XOPEN_SOURCE 600#define _DARWIN_C_SOURCE -#define _FILE_OFFSET_BITS 64 -#ifndef _LARGEFILE_SOURCE -#define _LARGEFILE_SOURCE -#endif -#ifndef _LARGEFILE64_SOURCE -#define _LARGEFILE64_SOURCE -#endif #ifndef _GNU_SOURCE#define _GNU_SOURCE#endif
Signature · 8 lines
2.42.0.rc1.204.g551eb34607-goog _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel