diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/fs/ntapi_tt_istat.c | 9 | ||||
-rw-r--r-- | src/fs/ntapi_tt_stat.c | 9 | ||||
-rw-r--r-- | src/fs/ntapi_tt_statfs.c | 11 |
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; |