aboutsummaryrefslogtreecommitdiff
path: root/win32/mntent.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/mntent.c')
-rw-r--r--win32/mntent.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/win32/mntent.c b/win32/mntent.c
index d39ceb4a6..9b04a9c5e 100644
--- a/win32/mntent.c
+++ b/win32/mntent.c
@@ -28,10 +28,11 @@ struct mntent *getmntent(FILE *stream)
28 struct mntdata *data = (struct mntdata *)stream; 28 struct mntdata *data = (struct mntdata *)stream;
29 static char mnt_fsname[4]; 29 static char mnt_fsname[4];
30 static char mnt_dir[4]; 30 static char mnt_dir[4];
31 static char mnt_type[100];
32 static char mnt_opts[4];
31 static struct mntent my_mount_entry = 33 static struct mntent my_mount_entry =
32 { mnt_fsname, mnt_dir, (char *)"", (char *)"", 0, 0 }; 34 { mnt_fsname, mnt_dir, mnt_type, mnt_opts, 0, 0 };
33 struct mntent *entry; 35 struct mntent *entry;
34 static char fsname[100];
35 36
36 entry = NULL; 37 entry = NULL;
37 while ( ++data->index < 26 ) { 38 while ( ++data->index < 26 ) {
@@ -43,12 +44,13 @@ struct mntent *getmntent(FILE *stream)
43 mnt_dir[1] = ':'; 44 mnt_dir[1] = ':';
44 mnt_dir[2] = '\\'; 45 mnt_dir[2] = '\\';
45 mnt_dir[3] = '\0'; 46 mnt_dir[3] = '\0';
47 mnt_type[0] = '\0';
48 mnt_opts[0] = '\0';
46 49
47 if ( GetDriveType(mnt_dir) == DRIVE_FIXED ) { 50 if ( GetDriveType(mnt_dir) == DRIVE_FIXED ) {
48 my_mount_entry.mnt_type = ""; 51 if ( !GetVolumeInformation(mnt_dir, NULL, 0, NULL, NULL,
49 if ( GetVolumeInformation(mnt_dir, NULL, 0, NULL, NULL, 52 NULL, mnt_type, 100) ) {
50 NULL, fsname, 100) ) { 53 mnt_type[0] = '\0';
51 my_mount_entry.mnt_type = fsname;
52 } 54 }
53 55
54 entry = &my_mount_entry; 56 entry = &my_mount_entry;