f2fs-tools: do not use SG_IO in Android

Android security team does not allow to use SG_IO.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Jaegeuk Kim 2022-05-23 13:30:37 -07:00 committed by sunshenshen
parent 90a36f3918
commit d0e53cc8aa
2 changed files with 2 additions and 3 deletions

View File

@ -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

View File

@ -898,7 +898,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};
@ -1000,7 +1000,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';