mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-23 01:59:54 +00:00
!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
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:
commit
5e5c12b007
2
config.h
2
config.h
@ -206,6 +206,8 @@
|
|||||||
|
|
||||||
#define HAVE_FSYNC 1
|
#define HAVE_FSYNC 1
|
||||||
|
|
||||||
|
#define WITH_OHOS 1
|
||||||
|
|
||||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
/* 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. */
|
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
|
@ -3335,7 +3335,7 @@ int fsck_verify(struct f2fs_sb_info *sbi)
|
|||||||
c.bug_on = 1;
|
c.bug_on = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WITH_ANDROID
|
#ifndef WITH_OHOS
|
||||||
if (nr_unref_nid && !c.ro) {
|
if (nr_unref_nid && !c.ro) {
|
||||||
char ans[255] = {0};
|
char ans[255] = {0};
|
||||||
int res;
|
int res;
|
||||||
|
@ -897,7 +897,7 @@ int get_device_info(int i)
|
|||||||
#ifdef HDIO_GETGIO
|
#ifdef HDIO_GETGIO
|
||||||
struct hd_geometry geom;
|
struct hd_geometry geom;
|
||||||
#endif
|
#endif
|
||||||
#if !defined(WITH_ANDROID) && defined(__linux__)
|
#if !defined(WITH_OHOS) && defined(__linux__)
|
||||||
sg_io_hdr_t io_hdr;
|
sg_io_hdr_t io_hdr;
|
||||||
unsigned char reply_buffer[96] = {0};
|
unsigned char reply_buffer[96] = {0};
|
||||||
unsigned char model_inq[6] = {MODELINQUIRY};
|
unsigned char model_inq[6] = {MODELINQUIRY};
|
||||||
@ -999,7 +999,7 @@ int get_device_info(int i)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(WITH_ANDROID) && defined(__linux__)
|
#if !defined(WITH_OHOS) && defined(__linux__)
|
||||||
/* Send INQUIRY command */
|
/* Send INQUIRY command */
|
||||||
memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
|
memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
|
||||||
io_hdr.interface_id = 'S';
|
io_hdr.interface_id = 'S';
|
||||||
|
Loading…
Reference in New Issue
Block a user