drive.c implement option to change fsname in config file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is as far as I've got with this for now. It works. If nothing else it is a backup of the work I've done so far, and gives you something to comment on. I toyed with the idea of having it validate the names against a table but that seems (to me) too restrictive. Anyway...

Change Log: Implement option to change FSname in config file.

Files changed files/drive.c
documentation/samples/config
documentation/configuring.sgml

--

Tony Lambregts

Index: files/drive.c
===================================================================
RCS file: /home/wine/wine/files/drive.c,v
retrieving revision 1.84
diff -u -u -r1.84 drive.c
--- files/drive.c	24 Jan 2003 00:54:58 -0000	1.84
+++ files/drive.c	25 Feb 2003 17:07:17 -0000
@@ -86,6 +86,7 @@
     DWORD     serial_conf;    /* drive serial number as cfg'd in wine config */
     UINT      type;      /* drive type */
     UINT      flags;     /* drive flags */
+    WCHAR     FSname[12];     /* file system name */
     UINT      codepage;  /* drive code page */
     dev_t     dev;       /* unix device number */
     ino_t     ino;       /* unix inode number */
@@ -201,6 +202,9 @@
     static const WCHAR FilesystemW[] = {'F','i','l','e','s','y','s','t','e','m',0};
     static const WCHAR win95W[] = {'w','i','n','9','5',0};
     static const WCHAR DeviceW[] = {'D','e','v','i','c','e',0};
+    static const WCHAR FSnameW[] = {'F','S','n','a','m','e',0};
+    static const WCHAR def_FSnameW[] = {'F','A','T',0};
+     
     static const WCHAR ReadVolInfoW[] = {'R','e','a','d','V','o','l','I','n','f','o',0};
     static const WCHAR FailReadOnlyW[] = {'F','a','i','l','R','e','a','d','O','n','l','y',0};
     static const WCHAR driveC_labelW[] = {'D','r','i','v','e',' ','C',' ',' ',' ',' ',0};
@@ -276,6 +280,9 @@
             /* Get the filesystem type */
             PROFILE_GetWineIniString( name, FilesystemW, win95W, buffer, 80 );
             drive->flags = DRIVE_GetFSFlags( name, buffer );
+	    
+            /* Get the filesystem name */
+            PROFILE_GetWineIniString( name, FSnameW, def_FSnameW, drive->FSname, 12 );	    
 
             /* Get the device */
             PROFILE_GetWineIniString( name, DeviceW, empty_strW, buffer, 80 );
@@ -1973,8 +1980,8 @@
         }
 	else
         {
-            static const WCHAR fatW[] = {'F','A','T',0};
-            strncpyW( fsname, fatW, fsname_len );
+         /*   static const WCHAR fatW[] = {'F','A','T',0}; */
+            strncpyW( fsname, DOSDrives[drive].FSname, fsname_len );
         }
         fsname[fsname_len - 1] = 0; /* ensure 0 termination */
     }
Index: documentation/samples/config
===================================================================
RCS file: /home/wine/wine/documentation/samples/config,v
retrieving revision 1.39
diff -u -u -r1.39 config
--- documentation/samples/config	12 Feb 2003 01:12:18 -0000	1.39
+++ documentation/samples/config	25 Feb 2003 17:07:18 -0000
@@ -21,6 +21,7 @@
 ;;   - "msdos" for FAT16 (ugly, upgrading to VFAT driver strongly recommended)
 ;;   DON'T use "unix" unless you intend to port programs using Winelib !
 ;; "Device"="/dev/xx" (only if you want to allow raw device access)
+;; "FSname"="xxx" Override for file system name (default="FAT") up to 11 chars
 ;;
 [Drive A]
 "Path" = "/mnt/fd0"
Index: documentation/configuring.sgml
===================================================================
RCS file: /home/wine/wine/documentation/configuring.sgml,v
retrieving revision 1.22
diff -u -u -r1.22 configuring.sgml
--- documentation/configuring.sgml	24 Dec 2002 00:56:33 -0000	1.22
+++ documentation/configuring.sgml	25 Feb 2003 17:07:20 -0000
@@ -290,6 +290,20 @@
             </varlistentry>
           </variablelist>
 
+          <para>
+            <programlisting>"FSname" = "xxx"</programlisting>
+            This Setting overrides the default fsname. If this value is
+            not set wine defaults to "FAT". Leaving this blank should 
+            be OK in most cases. The maximum size for FSname is 11 
+            characters. Some other common fsnames are FAT32 and NTFS.
+          </para>
+          <note>
+            <para>
+              CD-ROM drives are not affected by this setting, they 
+              always return "CDFS"
+            </para>
+          </note>
+
           <programlisting>"Device" = "/dev/xx"</programlisting>
           <para>
 	    Needed for raw device access and label and serial number reading.

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux