summaryrefslogtreecommitdiffhomepage
path: root/src/fs
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-12-24 13:44:00 +0000
committermidipix <writeonce@midipix.org>2016-12-25 01:30:51 -0500
commitfc83d8f323b7a866ad377aecb792bdaf3edeb6c8 (patch)
tree0706c3e130895ddeb9fb56bd37f61a927cefc9f0 /src/fs
parentfe73cffbedd7b4bfedb6c258fdf9e7b0a0a2c40c (diff)
downloadntapi-fc83d8f323b7a866ad377aecb792bdaf3edeb6c8.tar.bz2
ntapi-fc83d8f323b7a866ad377aecb792bdaf3edeb6c8.tar.xz
__ntapi_tt_istat(): respect NT_ISTAT_DEV_NAME_COPY.
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/ntapi_tt_istat.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/fs/ntapi_tt_istat.c b/src/fs/ntapi_tt_istat.c
index 00766ed..77eafb2 100644
--- a/src/fs/ntapi_tt_istat.c
+++ b/src/fs/ntapi_tt_istat.c
@@ -130,6 +130,20 @@ int32_t __stdcall __ntapi_tt_istat(
wch_mark,
(uintptr_t)wch - (uintptr_t)wch_mark);
+ if (!(flags & NT_ISTAT_DEV_NAME_COPY)) {
+ istat->dev_name[0] = 0;
+ return NT_STATUS_SUCCESS;
+ } else if (istat->dev_name_maxlen < sdev->strlen) {
+ istat->dev_name[0] = 0;
+ return NT_STATUS_BUFFER_TOO_SMALL;
+ }
+
+ __ntapi->tt_memcpy_utf16(
+ istat->dev_name,
+ sdev->buffer,
+ istat->dev_name_strlen);
+
+
return status;
}