From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-f2fs-devel@lists.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [f2fs-dev] [PATCH] f2fs-tools: do not use SG_IO in Android
Date: Mon, 23 May 2022 13:31:17 -0700 [thread overview]
Message-ID: <20220523203117.1810289-1-jaegeuk@kernel.org> (raw)
Android security team does not allow to use SG_IO.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
include/android_config.h | 1 -
lib/libf2fs.c | 4 ++--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/include/android_config.h b/include/android_config.h
index 4bcd5890313f..5f5c693cbbb3 100644
--- a/include/android_config.h
+++ b/include/android_config.h
@@ -24,7 +24,6 @@
#define HAVE_SYS_XATTR_H 1
#define HAVE_UNISTD_H 1
#define HAVE_UUID_UUID_H 1
-#define HAVE_SCSI_SG_H 1
#define HAVE_FALLOCATE 1
#define HAVE_FSETXATTR 1
diff --git a/lib/libf2fs.c b/lib/libf2fs.c
index 961e70cb7b1b..ad8d1bd03509 100644
--- a/lib/libf2fs.c
+++ b/lib/libf2fs.c
@@ -896,7 +896,7 @@ int get_device_info(int i)
#ifdef HDIO_GETGIO
struct hd_geometry geom;
#endif
-#ifdef __linux__
+#if !defined(WITH_ANDROID) && defined(__linux__)
sg_io_hdr_t io_hdr;
unsigned char reply_buffer[96] = {0};
unsigned char model_inq[6] = {MODELINQUIRY};
@@ -998,7 +998,7 @@ int get_device_info(int i)
#endif
}
-#ifdef __linux__
+#if !defined(WITH_ANDROID) && defined(__linux__)
/* Send INQUIRY command */
memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
io_hdr.interface_id = 'S';
--
2.36.1.124.g0e6072fb45-goog
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
reply other threads:[~2022-05-23 20:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220523203117.1810289-1-jaegeuk@kernel.org \
--to=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).