diff options
author | Ron Yorston <rmy@pobox.com> | 2014-10-06 14:44:00 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2014-10-06 14:44:00 +0100 |
commit | 6254967d9c893eb5349a43d3e75cb2fb6f98f23b (patch) | |
tree | c2e63d38f731278a216f1fab056720d933de9cab | |
parent | 56a49d82d29b08a4d20ae6decafaf2701b9bcdbe (diff) | |
download | busybox-w32-6254967d9c893eb5349a43d3e75cb2fb6f98f23b.tar.gz busybox-w32-6254967d9c893eb5349a43d3e75cb2fb6f98f23b.tar.bz2 busybox-w32-6254967d9c893eb5349a43d3e75cb2fb6f98f23b.zip |
win32: attempt to get filesystem type for mntent
-rw-r--r-- | win32/mntent.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/win32/mntent.c b/win32/mntent.c index 53f098796..d39ceb4a6 100644 --- a/win32/mntent.c +++ b/win32/mntent.c | |||
@@ -30,7 +30,8 @@ struct mntent *getmntent(FILE *stream) | |||
30 | static char mnt_dir[4]; | 30 | static char mnt_dir[4]; |
31 | static struct mntent my_mount_entry = | 31 | static struct mntent my_mount_entry = |
32 | { mnt_fsname, mnt_dir, (char *)"", (char *)"", 0, 0 }; | 32 | { mnt_fsname, mnt_dir, (char *)"", (char *)"", 0, 0 }; |
33 | static struct mntent *entry; | 33 | struct mntent *entry; |
34 | static char fsname[100]; | ||
34 | 35 | ||
35 | entry = NULL; | 36 | entry = NULL; |
36 | while ( ++data->index < 26 ) { | 37 | while ( ++data->index < 26 ) { |
@@ -44,6 +45,12 @@ struct mntent *getmntent(FILE *stream) | |||
44 | mnt_dir[3] = '\0'; | 45 | mnt_dir[3] = '\0'; |
45 | 46 | ||
46 | if ( GetDriveType(mnt_dir) == DRIVE_FIXED ) { | 47 | if ( GetDriveType(mnt_dir) == DRIVE_FIXED ) { |
48 | my_mount_entry.mnt_type = ""; | ||
49 | if ( GetVolumeInformation(mnt_dir, NULL, 0, NULL, NULL, | ||
50 | NULL, fsname, 100) ) { | ||
51 | my_mount_entry.mnt_type = fsname; | ||
52 | } | ||
53 | |||
47 | entry = &my_mount_entry; | 54 | entry = &my_mount_entry; |
48 | break; | 55 | break; |
49 | } | 56 | } |