!59 Fix: unrechable nid scanf & disk model change to config WITH_OHOS
Some checks failed
CI / build (android, clang, aarch64-linux-android32) (push) Has been cancelled
CI / build (linux-clang, clang) (push) Has been cancelled
CI / build (linux-gcc, gcc) (push) Has been cancelled
CI / build (linux-mingw64-gcc, gcc, -D__USE_MINGW_ANSI_STDIO, x86_64-w64-mingw32) (push) Has been cancelled
CI / build (linux-powerpc64-gcc, gcc, powerpc64-linux-gnu) (push) Has been cancelled
CI / build (macos, clang, macos-latest) (push) Has been cancelled
CI / build (x86, linux-x86-gcc, gcc) (push) Has been cancelled

Merge pull request !59 from nieben/cancel_disk_model_and_unref_nid_log
This commit is contained in:
openharmony_ci 2024-10-11 04:35:38 +00:00 committed by Gitee
commit 5e5c12b007
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 5 additions and 3 deletions

View File

@ -206,6 +206,8 @@
#define HAVE_FSYNC 1
#define WITH_OHOS 1
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus

View File

@ -3335,7 +3335,7 @@ int fsck_verify(struct f2fs_sb_info *sbi)
c.bug_on = 1;
}
#ifndef WITH_ANDROID
#ifndef WITH_OHOS
if (nr_unref_nid && !c.ro) {
char ans[255] = {0};
int res;

View File

@ -897,7 +897,7 @@ int get_device_info(int i)
#ifdef HDIO_GETGIO
struct hd_geometry geom;
#endif
#if !defined(WITH_ANDROID) && defined(__linux__)
#if !defined(WITH_OHOS) && defined(__linux__)
sg_io_hdr_t io_hdr;
unsigned char reply_buffer[96] = {0};
unsigned char model_inq[6] = {MODELINQUIRY};
@ -999,7 +999,7 @@ int get_device_info(int i)
#endif
}
#if !defined(WITH_ANDROID) && defined(__linux__)
#if !defined(WITH_OHOS) && defined(__linux__)
/* Send INQUIRY command */
memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
io_hdr.interface_id = 'S';