From 5765437d866e6da27f5b7cc9b30f9dac41dce9f9 Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 24 Dec 2016 14:04:17 +0000 Subject: __ntapi_tt_istat(): added NT_ISTAT_DEV_NAME_ONLY support. --- include/ntapi/nt_istat.h | 1 + src/fs/ntapi_tt_istat.c | 30 ++++++++++++++++-------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/include/ntapi/nt_istat.h b/include/ntapi/nt_istat.h index df87838..d8ac78c 100644 --- a/include/ntapi/nt_istat.h +++ b/include/ntapi/nt_istat.h @@ -9,6 +9,7 @@ #define NT_ISTAT_DEFAULT 0x00000000 #define NT_ISTAT_COMMON 0x00000001 #define NT_ISTAT_DEV_NAME_COPY 0x00000002 +#define NT_ISTAT_DEV_NAME_ONLY 0x08000000 #define NT_ISTAT_MUP_DEVICE 0x20000000 #define NT_ISTAT_NEW_HANDLE 0x80000000 diff --git a/src/fs/ntapi_tt_istat.c b/src/fs/ntapi_tt_istat.c index b524a5d..25d098c 100644 --- a/src/fs/ntapi_tt_istat.c +++ b/src/fs/ntapi_tt_istat.c @@ -66,22 +66,24 @@ int32_t __stdcall __ntapi_tt_istat( istat->hfile = hfile; /* file index number */ - if ((status = __ntapi->zw_query_information_file( - hfile, - &iosb, - &istat->fii, - sizeof(istat->fii), - NT_FILE_INTERNAL_INFORMATION))) - return status; + if (!(flags & NT_ISTAT_DEV_NAME_ONLY)) + if ((status = __ntapi->zw_query_information_file( + hfile, + &iosb, + &istat->fii, + sizeof(istat->fii), + NT_FILE_INTERNAL_INFORMATION))) + return status; /* attributes & reparse tag information */ - if ((status = __ntapi->zw_query_information_file( - hfile, - &iosb, - &istat->ftagi, - sizeof(istat->ftagi), - NT_FILE_ATTRIBUTE_TAG_INFORMATION))) - return status; + if (!(flags & NT_ISTAT_DEV_NAME_ONLY)) + if ((status = __ntapi->zw_query_information_file( + hfile, + &iosb, + &istat->ftagi, + sizeof(istat->ftagi), + NT_FILE_ATTRIBUTE_TAG_INFORMATION))) + return status; /* system-unique device name */ if ((status = __ntapi->zw_query_object( -- cgit v1.2.3