From 6254967d9c893eb5349a43d3e75cb2fb6f98f23b Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Mon, 6 Oct 2014 14:44:00 +0100 Subject: win32: attempt to get filesystem type for mntent --- win32/mntent.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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) static char mnt_dir[4]; static struct mntent my_mount_entry = { mnt_fsname, mnt_dir, (char *)"", (char *)"", 0, 0 }; - static struct mntent *entry; + struct mntent *entry; + static char fsname[100]; entry = NULL; while ( ++data->index < 26 ) { @@ -44,6 +45,12 @@ struct mntent *getmntent(FILE *stream) mnt_dir[3] = '\0'; if ( GetDriveType(mnt_dir) == DRIVE_FIXED ) { + my_mount_entry.mnt_type = ""; + if ( GetVolumeInformation(mnt_dir, NULL, 0, NULL, NULL, + NULL, fsname, 100) ) { + my_mount_entry.mnt_type = fsname; + } + entry = &my_mount_entry; break; } -- cgit v1.2.3-55-g6feb