summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-12-24 14:04:17 +0000
committermidipix <writeonce@midipix.org>2016-12-25 01:30:56 -0500
commit5765437d866e6da27f5b7cc9b30f9dac41dce9f9 (patch)
treef34b1c433f74d81aa8c0731d15778e623478c79c
parentfd484f4658c579e363321b2e65182e6b6f83a083 (diff)
downloadntapi-5765437d866e6da27f5b7cc9b30f9dac41dce9f9.tar.bz2
ntapi-5765437d866e6da27f5b7cc9b30f9dac41dce9f9.tar.xz
__ntapi_tt_istat(): added NT_ISTAT_DEV_NAME_ONLY support.
-rw-r--r--include/ntapi/nt_istat.h1
-rw-r--r--src/fs/ntapi_tt_istat.c30
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(