* [f2fs-dev] [PATCH 1/6] libf2fs_io: add unused mactor to avoid build failure
@ 2022-04-22 21:18 Jaegeuk Kim
2022-04-22 21:18 ` [f2fs-dev] [PATCH 2/6] android_config.h: add missing liblz4 Jaegeuk Kim
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Jaegeuk Kim @ 2022-04-22 21:18 UTC (permalink / raw)
To: linux-f2fs-devel; +Cc: Jaegeuk Kim
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
lib/libf2fs_io.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/lib/libf2fs_io.c b/lib/libf2fs_io.c
index 09a689293356..a392255e8e85 100644
--- a/lib/libf2fs_io.c
+++ b/lib/libf2fs_io.c
@@ -501,9 +501,22 @@ static int sparse_merge_blocks(uint64_t start, uint64_t num, int zero)
F2FS_BLKSIZE * num, start);
}
#else
-static int sparse_read_blk(__u64 block, int count, void *buf) { return 0; }
-static int sparse_write_blk(__u64 block, int count, const void *buf) { return 0; }
-static int sparse_write_zeroed_blk(__u64 block, int count) { return 0; }
+static int sparse_read_blk(__u64 UNUSED(block),
+ int UNUSED(count), void *UNUSED(buf))
+{
+ return 0;
+}
+
+static int sparse_write_blk(__u64 UNUSED(block),
+ int UNUSED(count), const void *UNUSED(buf))
+{
+ return 0;
+}
+
+static int sparse_write_zeroed_blk(__u64 UNUSED(block), int UNUSED(count))
+{
+ return 0;
+}
#endif
int dev_read(void *buf, __u64 offset, size_t len)
--
2.36.0.rc2.479.g8af0fa9b8e-goog
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [f2fs-dev] [PATCH 2/6] android_config.h: add missing liblz4
2022-04-22 21:18 [f2fs-dev] [PATCH 1/6] libf2fs_io: add unused mactor to avoid build failure Jaegeuk Kim
@ 2022-04-22 21:18 ` Jaegeuk Kim
2022-04-22 21:18 ` [f2fs-dev] [PATCH 3/6] f2fs-tools: support zoned device in Android Jaegeuk Kim
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Jaegeuk Kim @ 2022-04-22 21:18 UTC (permalink / raw)
To: linux-f2fs-devel; +Cc: Jaegeuk Kim
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
include/android_config.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/android_config.h b/include/android_config.h
index 865e4087ccfe..ce6723309447 100644
--- a/include/android_config.h
+++ b/include/android_config.h
@@ -31,6 +31,7 @@
#define HAVE_SELINUX_ANDROID_H 1
#define HAVE_SETMNTENT 1
#define HAVE_SPARSE_SPARSE_H 1
+#define HAVE_LIBLZ4 1
#ifdef WITH_SLOAD
#define HAVE_LIBSELINUX 1
@@ -57,6 +58,7 @@
#define HAVE_GETMNTENT 1
#define HAVE_LLSEEK 1
#define HAVE_MEMSET 1
+#define HAVE_LIBLZ4 1
#ifdef WITH_SLOAD
#define HAVE_LIBSELINUX 1
--
2.36.0.rc2.479.g8af0fa9b8e-goog
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [f2fs-dev] [PATCH 3/6] f2fs-tools: support zoned device in Android
2022-04-22 21:18 [f2fs-dev] [PATCH 1/6] libf2fs_io: add unused mactor to avoid build failure Jaegeuk Kim
2022-04-22 21:18 ` [f2fs-dev] [PATCH 2/6] android_config.h: add missing liblz4 Jaegeuk Kim
@ 2022-04-22 21:18 ` Jaegeuk Kim
2022-04-26 23:06 ` [f2fs-dev] [PATCH 3/6 v2] " Jaegeuk Kim
2022-04-22 21:18 ` [f2fs-dev] [PATCH 4/6] f2fs-tools: use fsync() " Jaegeuk Kim
` (2 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Jaegeuk Kim @ 2022-04-22 21:18 UTC (permalink / raw)
To: linux-f2fs-devel; +Cc: Jaegeuk Kim
This requires to change Android.bp in AOSP.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Change-Id: I28a4a701513cb2420cdf0e0e2aa3f60e712f2fcb
---
configure.ac | 9 ++++++++-
fsck/fsck.c | 2 +-
include/android_config.h | 3 +++
include/f2fs_fs.h | 4 +++-
lib/libf2fs.c | 10 +++-------
5 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/configure.ac b/configure.ac
index f0ed5f6528d9..e8ce0057c4ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,6 +95,7 @@ AC_CHECK_HEADERS(m4_flatten([
blkid/blkid.h
byteswap.h
fcntl.h
+ kernel/uapi/linux/blkzoned.h
linux/blkzoned.h
linux/falloc.h
linux/fiemap.h
@@ -222,7 +223,13 @@ AC_CONFIG_FILES([
AC_CHECK_MEMBER([struct blk_zone.capacity],
[AC_DEFINE(HAVE_BLK_ZONE_REP_V2, [1], [report zones includes zone capacity])],
- [], [[#include <linux/blkzoned.h>]])
+ [], [[
+#ifdef HAVE_KERNEL_UAPI_LINUX_BLKZONED_H
+#include <kernel/uapi/linux/blkzoned.h>
+#elif defined(HAVE_LINUX_BLKZONED_H)
+#include <linux/blkzoned.h>
+#endif
+ ]])
# export library version info for mkfs/libf2fs_format_la
AC_SUBST(FMT_CURRENT, 7)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 19a28b0eedad..3b37519e9054 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -2994,7 +2994,7 @@ struct write_pointer_check_data {
int dev_index;
};
-static int chk_and_fix_wp_with_sit(int i, void *blkzone, void *opaque)
+static int chk_and_fix_wp_with_sit(int UNUSED(i), void *blkzone, void *opaque)
{
struct blk_zone *blkz = (struct blk_zone *)blkzone;
struct write_pointer_check_data *wpd = opaque;
diff --git a/include/android_config.h b/include/android_config.h
index ce6723309447..671cab6fb003 100644
--- a/include/android_config.h
+++ b/include/android_config.h
@@ -1,7 +1,9 @@
#if defined(__linux__)
+#define HAVE_BLK_ZONE_REP_V2 1
#define HAVE_BYTESWAP_H 1
#define HAVE_FCNTL_H 1
#define HAVE_FALLOC_H 1
+#define HAVE_KERNEL_UAPI_LINUX_BLKZONED_H 1
#define HAVE_LINUX_HDREG_H 1
#define HAVE_LINUX_LIMITS_H 1
#define HAVE_POSIX_ACL_H 1
@@ -19,6 +21,7 @@
#define HAVE_SYS_SYSMACROS_H 1
#define HAVE_SYS_XATTR_H 1
#define HAVE_UNISTD_H 1
+#define HAVE_SCSI_SG_H 1
#define HAVE_FALLOCATE 1
#define HAVE_FSETXATTR 1
diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
index 1d7103c1d6fe..d6374270c188 100644
--- a/include/f2fs_fs.h
+++ b/include/f2fs_fs.h
@@ -50,7 +50,9 @@
#endif
#include <sys/types.h>
-#ifdef HAVE_LINUX_BLKZONED_H
+#ifdef HAVE_KERNEL_UAPI_LINUX_BLKZONED_H
+#include <kernel/uapi/linux/blkzoned.h>
+#elif defined(HAVE_LINUX_BLKZONED_H)
#include <linux/blkzoned.h>
#endif
diff --git a/lib/libf2fs.c b/lib/libf2fs.c
index 63d07f26c739..afdbbbe17d84 100644
--- a/lib/libf2fs.c
+++ b/lib/libf2fs.c
@@ -34,11 +34,9 @@
#ifdef HAVE_SYS_UTSNAME_H
#include <sys/utsname.h>
#endif
-#ifndef WITH_ANDROID
#ifdef HAVE_SCSI_SG_H
#include <scsi/sg.h>
#endif
-#endif
#ifdef HAVE_LINUX_HDREG_H
#include <linux/hdreg.h>
#endif
@@ -46,10 +44,8 @@
#include <linux/limits.h>
#endif
-#ifndef WITH_ANDROID
/* SCSI command for standard inquiry*/
#define MODELINQUIRY 0x12,0x00,0x00,0x00,0x4A,0x00
-#endif
#ifndef _WIN32 /* O_BINARY is windows-specific flag */
#define O_BINARY 0
@@ -900,7 +896,7 @@ int get_device_info(int i)
#ifdef HDIO_GETGIO
struct hd_geometry geom;
#endif
-#if !defined(WITH_ANDROID) && defined(__linux__)
+#ifdef __linux__
sg_io_hdr_t io_hdr;
unsigned char reply_buffer[96] = {0};
unsigned char model_inq[6] = {MODELINQUIRY};
@@ -1002,7 +998,7 @@ int get_device_info(int i)
#endif
}
-#if !defined(WITH_ANDROID) && defined(__linux__)
+#ifdef __linux__
/* Send INQUIRY command */
memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
io_hdr.interface_id = 'S';
@@ -1033,7 +1029,7 @@ int get_device_info(int i)
return -1;
}
-#if !defined(WITH_ANDROID) && defined(__linux__)
+#ifdef __linux__
if (S_ISBLK(stat_buf->st_mode)) {
if (f2fs_get_zoned_model(i) < 0) {
free(stat_buf);
--
2.36.0.rc2.479.g8af0fa9b8e-goog
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [f2fs-dev] [PATCH 4/6] f2fs-tools: use fsync() in Android
2022-04-22 21:18 [f2fs-dev] [PATCH 1/6] libf2fs_io: add unused mactor to avoid build failure Jaegeuk Kim
2022-04-22 21:18 ` [f2fs-dev] [PATCH 2/6] android_config.h: add missing liblz4 Jaegeuk Kim
2022-04-22 21:18 ` [f2fs-dev] [PATCH 3/6] f2fs-tools: support zoned device in Android Jaegeuk Kim
@ 2022-04-22 21:18 ` Jaegeuk Kim
2022-04-22 21:18 ` [f2fs-dev] [PATCH 5/6] f2fs-tools: use android config only if there's no config.h Jaegeuk Kim
2022-04-22 21:18 ` [f2fs-dev] [PATCH 6/6] mkfs.f2fs: check uuid library Jaegeuk Kim
4 siblings, 0 replies; 8+ messages in thread
From: Jaegeuk Kim @ 2022-04-22 21:18 UTC (permalink / raw)
To: linux-f2fs-devel; +Cc: Jaegeuk Kim
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
include/android_config.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/android_config.h b/include/android_config.h
index 671cab6fb003..5a856a30fd8c 100644
--- a/include/android_config.h
+++ b/include/android_config.h
@@ -3,6 +3,7 @@
#define HAVE_BYTESWAP_H 1
#define HAVE_FCNTL_H 1
#define HAVE_FALLOC_H 1
+#define HAVE_FSYNC 1
#define HAVE_KERNEL_UAPI_LINUX_BLKZONED_H 1
#define HAVE_LINUX_HDREG_H 1
#define HAVE_LINUX_LIMITS_H 1
--
2.36.0.rc2.479.g8af0fa9b8e-goog
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [f2fs-dev] [PATCH 5/6] f2fs-tools: use android config only if there's no config.h
2022-04-22 21:18 [f2fs-dev] [PATCH 1/6] libf2fs_io: add unused mactor to avoid build failure Jaegeuk Kim
` (2 preceding siblings ...)
2022-04-22 21:18 ` [f2fs-dev] [PATCH 4/6] f2fs-tools: use fsync() " Jaegeuk Kim
@ 2022-04-22 21:18 ` Jaegeuk Kim
2022-04-26 16:30 ` [f2fs-dev] [PATCH 5/6 v2] " Jaegeuk Kim
2022-04-22 21:18 ` [f2fs-dev] [PATCH 6/6] mkfs.f2fs: check uuid library Jaegeuk Kim
4 siblings, 1 reply; 8+ messages in thread
From: Jaegeuk Kim @ 2022-04-22 21:18 UTC (permalink / raw)
To: linux-f2fs-devel; +Cc: Jaegeuk Kim
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
include/f2fs_fs.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
index d6374270c188..b821b8279f82 100644
--- a/include/f2fs_fs.h
+++ b/include/f2fs_fs.h
@@ -26,10 +26,10 @@
#include <stddef.h>
#include <string.h>
#include <time.h>
+
#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
-
+#else
#ifdef __ANDROID__
#define WITH_ANDROID
#endif
@@ -43,6 +43,7 @@
#define WITH_SLOAD
#define WITH_LABEL
#endif
+#endif /* HAVE_CONFIG_H */
#include <inttypes.h>
#ifdef HAVE_LINUX_TYPES_H
--
2.36.0.rc2.479.g8af0fa9b8e-goog
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [f2fs-dev] [PATCH 6/6] mkfs.f2fs: check uuid library
2022-04-22 21:18 [f2fs-dev] [PATCH 1/6] libf2fs_io: add unused mactor to avoid build failure Jaegeuk Kim
` (3 preceding siblings ...)
2022-04-22 21:18 ` [f2fs-dev] [PATCH 5/6] f2fs-tools: use android config only if there's no config.h Jaegeuk Kim
@ 2022-04-22 21:18 ` Jaegeuk Kim
4 siblings, 0 replies; 8+ messages in thread
From: Jaegeuk Kim @ 2022-04-22 21:18 UTC (permalink / raw)
To: linux-f2fs-devel; +Cc: Jaegeuk Kim
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
mkfs/f2fs_format.c | 3 ++-
tools/f2fscrypt.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
index ce7d1c9e40bd..2759b5a03bc4 100644
--- a/mkfs/f2fs_format.c
+++ b/mkfs/f2fs_format.c
@@ -24,7 +24,8 @@
#include "config.h"
#ifdef HAVE_UUID_UUID_H
#include <uuid/uuid.h>
-#else
+#endif
+#ifndef HAVE_LIBUUID
#define uuid_parse(a, b) -1
#define uuid_generate(a)
#endif
diff --git a/tools/f2fscrypt.c b/tools/f2fscrypt.c
index f2fbf0bf3878..4c5d87036225 100644
--- a/tools/f2fscrypt.c
+++ b/tools/f2fscrypt.c
@@ -356,7 +356,7 @@ static void parse_salt(char *salt_str, int flags)
perror("F2FS_IOC_GET_ENCRYPTION_PWSALT");
exit(1);
}
-#ifdef HAVE_UUID_UUID_H
+#ifdef HAVE_LIBUUID
if (options & OPT_VERBOSE) {
char tmp[80];
uuid_unparse(buf, tmp);
@@ -384,7 +384,7 @@ static void parse_salt(char *salt_str, int flags)
(((unsigned char)(h - hexchars) << 4) +
(unsigned char)(l - hexchars));
}
-#ifdef HAVE_UUID_UUID_H
+#ifdef HAVE_LIBUUID
} else if (uuid_parse(cp, buf) == 0) {
salt_len = 16;
#endif
--
2.36.0.rc2.479.g8af0fa9b8e-goog
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [f2fs-dev] [PATCH 5/6 v2] f2fs-tools: use android config only if there's no config.h
2022-04-22 21:18 ` [f2fs-dev] [PATCH 5/6] f2fs-tools: use android config only if there's no config.h Jaegeuk Kim
@ 2022-04-26 16:30 ` Jaegeuk Kim
0 siblings, 0 replies; 8+ messages in thread
From: Jaegeuk Kim @ 2022-04-26 16:30 UTC (permalink / raw)
To: linux-f2fs-devel
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
Change log from v1:
- Fix xfstests failure
include/f2fs_fs.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
index d6374270c188..ad2798cf388c 100644
--- a/include/f2fs_fs.h
+++ b/include/f2fs_fs.h
@@ -26,13 +26,14 @@
#include <stddef.h>
#include <string.h>
#include <time.h>
+
#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
-
+#else
#ifdef __ANDROID__
#define WITH_ANDROID
#endif
+#endif /* HAVE_CONFIG_H */
#ifdef WITH_ANDROID
#include <android_config.h>
--
2.36.0.rc2.479.g8af0fa9b8e-goog
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [f2fs-dev] [PATCH 3/6 v2] f2fs-tools: support zoned device in Android
2022-04-22 21:18 ` [f2fs-dev] [PATCH 3/6] f2fs-tools: support zoned device in Android Jaegeuk Kim
@ 2022-04-26 23:06 ` Jaegeuk Kim
0 siblings, 0 replies; 8+ messages in thread
From: Jaegeuk Kim @ 2022-04-26 23:06 UTC (permalink / raw)
To: linux-f2fs-devel
This requires to change Android.bp in AOSP.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Change-Id: I28a4a701513cb2420cdf0e0e2aa3f60e712f2fcb
---
configure.ac | 9 ++++++++-
fsck/fsck.c | 2 +-
include/android_config.h | 4 ++++
include/f2fs_fs.h | 4 +++-
lib/libf2fs.c | 10 +++-------
5 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/configure.ac b/configure.ac
index f0ed5f6528d9..e8ce0057c4ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,6 +95,7 @@ AC_CHECK_HEADERS(m4_flatten([
blkid/blkid.h
byteswap.h
fcntl.h
+ kernel/uapi/linux/blkzoned.h
linux/blkzoned.h
linux/falloc.h
linux/fiemap.h
@@ -222,7 +223,13 @@ AC_CONFIG_FILES([
AC_CHECK_MEMBER([struct blk_zone.capacity],
[AC_DEFINE(HAVE_BLK_ZONE_REP_V2, [1], [report zones includes zone capacity])],
- [], [[#include <linux/blkzoned.h>]])
+ [], [[
+#ifdef HAVE_KERNEL_UAPI_LINUX_BLKZONED_H
+#include <kernel/uapi/linux/blkzoned.h>
+#elif defined(HAVE_LINUX_BLKZONED_H)
+#include <linux/blkzoned.h>
+#endif
+ ]])
# export library version info for mkfs/libf2fs_format_la
AC_SUBST(FMT_CURRENT, 7)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 19a28b0eedad..3b37519e9054 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -2994,7 +2994,7 @@ struct write_pointer_check_data {
int dev_index;
};
-static int chk_and_fix_wp_with_sit(int i, void *blkzone, void *opaque)
+static int chk_and_fix_wp_with_sit(int UNUSED(i), void *blkzone, void *opaque)
{
struct blk_zone *blkz = (struct blk_zone *)blkzone;
struct write_pointer_check_data *wpd = opaque;
diff --git a/include/android_config.h b/include/android_config.h
index ce6723309447..d7e4f60d91c6 100644
--- a/include/android_config.h
+++ b/include/android_config.h
@@ -1,7 +1,10 @@
#if defined(__linux__)
+#define HAVE_BLK_ZONE_REP_V2 1
#define HAVE_BYTESWAP_H 1
#define HAVE_FCNTL_H 1
#define HAVE_FALLOC_H 1
+#define HAVE_KERNEL_UAPI_LINUX_BLKZONED_H 1
+#define HAVE_LINUX_BLKZONED_H 1
#define HAVE_LINUX_HDREG_H 1
#define HAVE_LINUX_LIMITS_H 1
#define HAVE_POSIX_ACL_H 1
@@ -19,6 +22,7 @@
#define HAVE_SYS_SYSMACROS_H 1
#define HAVE_SYS_XATTR_H 1
#define HAVE_UNISTD_H 1
+#define HAVE_SCSI_SG_H 1
#define HAVE_FALLOCATE 1
#define HAVE_FSETXATTR 1
diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
index 1d7103c1d6fe..d6374270c188 100644
--- a/include/f2fs_fs.h
+++ b/include/f2fs_fs.h
@@ -50,7 +50,9 @@
#endif
#include <sys/types.h>
-#ifdef HAVE_LINUX_BLKZONED_H
+#ifdef HAVE_KERNEL_UAPI_LINUX_BLKZONED_H
+#include <kernel/uapi/linux/blkzoned.h>
+#elif defined(HAVE_LINUX_BLKZONED_H)
#include <linux/blkzoned.h>
#endif
diff --git a/lib/libf2fs.c b/lib/libf2fs.c
index 63d07f26c739..afdbbbe17d84 100644
--- a/lib/libf2fs.c
+++ b/lib/libf2fs.c
@@ -34,11 +34,9 @@
#ifdef HAVE_SYS_UTSNAME_H
#include <sys/utsname.h>
#endif
-#ifndef WITH_ANDROID
#ifdef HAVE_SCSI_SG_H
#include <scsi/sg.h>
#endif
-#endif
#ifdef HAVE_LINUX_HDREG_H
#include <linux/hdreg.h>
#endif
@@ -46,10 +44,8 @@
#include <linux/limits.h>
#endif
-#ifndef WITH_ANDROID
/* SCSI command for standard inquiry*/
#define MODELINQUIRY 0x12,0x00,0x00,0x00,0x4A,0x00
-#endif
#ifndef _WIN32 /* O_BINARY is windows-specific flag */
#define O_BINARY 0
@@ -900,7 +896,7 @@ int get_device_info(int i)
#ifdef HDIO_GETGIO
struct hd_geometry geom;
#endif
-#if !defined(WITH_ANDROID) && defined(__linux__)
+#ifdef __linux__
sg_io_hdr_t io_hdr;
unsigned char reply_buffer[96] = {0};
unsigned char model_inq[6] = {MODELINQUIRY};
@@ -1002,7 +998,7 @@ int get_device_info(int i)
#endif
}
-#if !defined(WITH_ANDROID) && defined(__linux__)
+#ifdef __linux__
/* Send INQUIRY command */
memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
io_hdr.interface_id = 'S';
@@ -1033,7 +1029,7 @@ int get_device_info(int i)
return -1;
}
-#if !defined(WITH_ANDROID) && defined(__linux__)
+#ifdef __linux__
if (S_ISBLK(stat_buf->st_mode)) {
if (f2fs_get_zoned_model(i) < 0) {
free(stat_buf);
--
2.36.0.rc2.479.g8af0fa9b8e-goog
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-04-26 23:06 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-22 21:18 [f2fs-dev] [PATCH 1/6] libf2fs_io: add unused mactor to avoid build failure Jaegeuk Kim
2022-04-22 21:18 ` [f2fs-dev] [PATCH 2/6] android_config.h: add missing liblz4 Jaegeuk Kim
2022-04-22 21:18 ` [f2fs-dev] [PATCH 3/6] f2fs-tools: support zoned device in Android Jaegeuk Kim
2022-04-26 23:06 ` [f2fs-dev] [PATCH 3/6 v2] " Jaegeuk Kim
2022-04-22 21:18 ` [f2fs-dev] [PATCH 4/6] f2fs-tools: use fsync() " Jaegeuk Kim
2022-04-22 21:18 ` [f2fs-dev] [PATCH 5/6] f2fs-tools: use android config only if there's no config.h Jaegeuk Kim
2022-04-26 16:30 ` [f2fs-dev] [PATCH 5/6 v2] " Jaegeuk Kim
2022-04-22 21:18 ` [f2fs-dev] [PATCH 6/6] mkfs.f2fs: check uuid library Jaegeuk Kim
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).