summaryrefslogtreecommitdiffhomepage
path: root/src/fs
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-12-24 13:54:46 +0000
committermidipix <writeonce@midipix.org>2016-12-25 01:30:54 -0500
commitfd484f4658c579e363321b2e65182e6b6f83a083 (patch)
treea620b33ee04d6a2263b71068f47f59cd0f91f075 /src/fs
parentfc83d8f323b7a866ad377aecb792bdaf3edeb6c8 (diff)
downloadntapi-fd484f4658c579e363321b2e65182e6b6f83a083.tar.bz2
ntapi-fd484f4658c579e363321b2e65182e6b6f83a083.tar.xz
__ntapi_tt_{i}stat{fs}(): \Device\Mup: include share name in device name.
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/ntapi_tt_istat.c9
-rw-r--r--src/fs/ntapi_tt_stat.c9
-rw-r--r--src/fs/ntapi_tt_statfs.c11
3 files changed, 22 insertions, 7 deletions
diff --git a/src/fs/ntapi_tt_istat.c b/src/fs/ntapi_tt_istat.c
index 77eafb2..b524a5d 100644
--- a/src/fs/ntapi_tt_istat.c
+++ b/src/fs/ntapi_tt_istat.c
@@ -116,13 +116,18 @@ int32_t __stdcall __ntapi_tt_istat(
wch_mark = &wch[12];
hash = __DEVICE_MUP_PREFIX_HASH;
istat->flags |= NT_STATFS_MUP_DEVICE;
+
+ for (wch=wch_mark; *wch!='\\'; wch++)
+ (void)0;
+ wch++;
} else {
wch_mark = &wch[8];
+ wch = wch_mark;
hash = __DEVICE_PATH_PREFIX_HASH;
}
- for (wch=wch_mark; *wch!='\\'; wch++)
- (void)0;
+ for (; *wch!='\\'; )
+ wch++;
istat->dev_name_strlen = (uint16_t)((wch - sdev->buffer) * sizeof(uint16_t));
istat->dev_name_hash = __ntapi->tt_buffer_crc32(
diff --git a/src/fs/ntapi_tt_stat.c b/src/fs/ntapi_tt_stat.c
index f6b5849..7c7afed 100644
--- a/src/fs/ntapi_tt_stat.c
+++ b/src/fs/ntapi_tt_stat.c
@@ -126,13 +126,18 @@ int32_t __stdcall __ntapi_tt_stat(
wch_mark = &wch[12];
hash = __DEVICE_MUP_PREFIX_HASH;
stat->flags |= NT_STAT_MUP_DEVICE;
+
+ for (wch=wch_mark; *wch!='\\'; wch++)
+ (void)0;
+ wch++;
} else {
wch_mark = &wch[8];
+ wch = wch_mark;
hash = __DEVICE_PATH_PREFIX_HASH;
}
- for (wch=wch_mark; *wch!='\\'; wch++)
- (void)0;
+ for (; *wch!='\\'; )
+ wch++;
stat->dev_name_strlen = (uint16_t)((wch - sdev->buffer) * sizeof(uint16_t));
stat->dev_name_hash = __ntapi->tt_buffer_crc32(
diff --git a/src/fs/ntapi_tt_statfs.c b/src/fs/ntapi_tt_statfs.c
index b499074..aed6374 100644
--- a/src/fs/ntapi_tt_statfs.c
+++ b/src/fs/ntapi_tt_statfs.c
@@ -164,15 +164,20 @@ int32_t __stdcall __ntapi_tt_statfs(
statfs->flags |= NT_STATFS_MUP_DEVICE;
hash = __DEVICE_MUP_PREFIX_HASH;
- wch_mark = &wch[8];
+ wch_mark = &wch[12];
statfs->nt_drive_letter = 0;
+
+ for (wch=wch_mark; *wch!='\\'; wch++)
+ (void)0;
+ wch++;
} else {
wch_mark = &wch[8];
+ wch = wch_mark;
hash = __DEVICE_PATH_PREFIX_HASH;
}
- for (wch=wch_mark; *wch!='\\'; wch++)
- (void)0;
+ for (; *wch!='\\'; )
+ wch++;
statfs->dev_name_strlen = (uint16_t)((wch - sdev->buffer) * sizeof(uint16_t));
statfs->record_name_strlen = sdev->strlen - statfs->dev_name_strlen;