Commit 954c570a authored by Alexandre Julliard's avatar Alexandre Julliard

Reimplemented GetVolumeInformation and SetVolumeLabel; volume label

and serial number are now stored in the filesystem instead of in the config file (partly based on a patch by Eric Pouech).
parent b8fc5282
...@@ -75,6 +75,7 @@ C_SRCS = \ ...@@ -75,6 +75,7 @@ C_SRCS = \
utthunk.c \ utthunk.c \
version.c \ version.c \
virtual.c \ virtual.c \
volume.c \
vxd.c \ vxd.c \
win87em.c \ win87em.c \
windebug.c \ windebug.c \
......
...@@ -227,7 +227,7 @@ static DWORD FILE_GetNtStatus(void) ...@@ -227,7 +227,7 @@ static DWORD FILE_GetNtStatus(void)
case EINVAL: case EINVAL:
case ENOTEMPTY: nt = STATUS_DIRECTORY_NOT_EMPTY; break; case ENOTEMPTY: nt = STATUS_DIRECTORY_NOT_EMPTY; break;
case EPIPE: nt = STATUS_PIPE_BROKEN; break; case EPIPE: nt = STATUS_PIPE_BROKEN; break;
case EIO: nt = STATUS_DISK_CORRUPT_ERROR; break; case EIO: nt = STATUS_DEVICE_NOT_READY; break;
case ENOEXEC: /* ?? */ case ENOEXEC: /* ?? */
case ESPIPE: /* ?? */ case ESPIPE: /* ?? */
case EEXIST: /* ?? */ case EEXIST: /* ?? */
......
...@@ -11,8 +11,6 @@ WINE REGISTRY Version 2 ...@@ -11,8 +11,6 @@ WINE REGISTRY Version 2
;; [Drive X] ;; [Drive X]
;; "Path"="xxx" (Unix path for drive root) ;; "Path"="xxx" (Unix path for drive root)
;; "Type"="xxx" (supported types are 'floppy', 'hd', 'cdrom' and 'network') ;; "Type"="xxx" (supported types are 'floppy', 'hd', 'cdrom' and 'network')
;; "Label"="xxx" (drive label, at most 11 characters)
;; "Serial"="xxx" (serial number, 8 characters hexadecimal number)
;; "Filesystem"="xxx" (supported types are 'msdos'/'dos'/'fat', 'win95'/'vfat', 'unix') ;; "Filesystem"="xxx" (supported types are 'msdos'/'dos'/'fat', 'win95'/'vfat', 'unix')
;; This is the FS Wine is supposed to emulate on a certain ;; This is the FS Wine is supposed to emulate on a certain
;; directory structure. ;; directory structure.
...@@ -25,21 +23,17 @@ WINE REGISTRY Version 2 ...@@ -25,21 +23,17 @@ WINE REGISTRY Version 2
[Drive A] [Drive A]
"Path" = "/mnt/fd0" "Path" = "/mnt/fd0"
"Type" = "floppy" "Type" = "floppy"
"Label" = "Floppy"
"Filesystem" = "win95" "Filesystem" = "win95"
"Serial" = "87654321"
"Device" = "/dev/fd0" "Device" = "/dev/fd0"
[Drive C] [Drive C]
"Path" = "/c" "Path" = "/c"
"Type" = "hd" "Type" = "hd"
"Label" = "MS-DOS"
"Filesystem" = "win95" "Filesystem" = "win95"
[Drive D] [Drive D]
"Path" = "/cdrom" "Path" = "/cdrom"
"Type" = "cdrom" "Type" = "cdrom"
"Label" = "CD-Rom"
"Filesystem" = "win95" "Filesystem" = "win95"
; make sure that device is correct and has proper permissions ! ; make sure that device is correct and has proper permissions !
"Device" = "/dev/cdrom" "Device" = "/dev/cdrom"
...@@ -47,19 +41,16 @@ WINE REGISTRY Version 2 ...@@ -47,19 +41,16 @@ WINE REGISTRY Version 2
[Drive E] [Drive E]
"Path" = "/tmp" "Path" = "/tmp"
"Type" = "hd" "Type" = "hd"
"Label" = "Tmp Drive"
"Filesystem" = "win95" "Filesystem" = "win95"
[Drive F] [Drive F]
"Path" = "%HOME%" "Path" = "%HOME%"
"Type" = "network" "Type" = "network"
"Label" = "Home"
"Filesystem" = "win95" "Filesystem" = "win95"
[Drive Z] [Drive Z]
"Path" = "/" "Path" = "/"
"Type" = "hd" "Type" = "hd"
"Label" = "Root"
"Filesystem" = "win95" "Filesystem" = "win95"
[wine] [wine]
......
...@@ -60,19 +60,6 @@ Used to specify the drive type this drive appears as in Windows ...@@ -60,19 +60,6 @@ Used to specify the drive type this drive appears as in Windows
or DOS programs; supported types are "floppy", "hd", "cdrom" or DOS programs; supported types are "floppy", "hd", "cdrom"
and "network". and "network".
.PP .PP
.I format: """Label""=""<label>"""
.br
default: "Drive X"
.br
Used to specify the drive label; limited to 11 characters.
.PP
.I format: """Serial""=""<serial>"""
.br
default: "12345678"
.br
Used to specify the drive serial number, as an 8-character hexadecimal
number.
.PP
.I format: """Filesystem""=""<fstype>""" .I format: """Filesystem""=""<fstype>"""
.br .br
default: "win95" default: "win95"
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#define DRIVE_CASE_SENSITIVE 0x0004 /* Drive fs is case sensitive */ #define DRIVE_CASE_SENSITIVE 0x0004 /* Drive fs is case sensitive */
#define DRIVE_CASE_PRESERVING 0x0008 /* Drive fs is case preserving */ #define DRIVE_CASE_PRESERVING 0x0008 /* Drive fs is case preserving */
#define DRIVE_FAIL_READ_ONLY 0x0010 /* Fail opening read-only files for writing */ #define DRIVE_FAIL_READ_ONLY 0x0010 /* Fail opening read-only files for writing */
#define DRIVE_READ_VOL_INFO 0x0020 /* Try to read volume info from the device? */
extern int DRIVE_Init(void); extern int DRIVE_Init(void);
extern int DRIVE_IsValid( int drive ); extern int DRIVE_IsValid( int drive );
...@@ -44,13 +43,8 @@ extern const char * DRIVE_GetRoot( int drive ); ...@@ -44,13 +43,8 @@ extern const char * DRIVE_GetRoot( int drive );
extern LPCWSTR DRIVE_GetDosCwd( int drive ); extern LPCWSTR DRIVE_GetDosCwd( int drive );
extern const char * DRIVE_GetUnixCwd( int drive ); extern const char * DRIVE_GetUnixCwd( int drive );
extern const char * DRIVE_GetDevice( int drive ); extern const char * DRIVE_GetDevice( int drive );
extern LPCWSTR DRIVE_GetLabel( int drive );
extern DWORD DRIVE_GetSerialNumber( int drive );
extern int DRIVE_SetSerialNumber( int drive, DWORD serial );
extern UINT DRIVE_GetFlags( int drive ); extern UINT DRIVE_GetFlags( int drive );
extern int DRIVE_Chdir( int drive, LPCWSTR path ); extern int DRIVE_Chdir( int drive, LPCWSTR path );
extern int DRIVE_Disable( int drive );
extern int DRIVE_Enable( int drive );
extern WCHAR *DRIVE_BuildEnv(void); extern WCHAR *DRIVE_BuildEnv(void);
#endif /* __WINE_DRIVE_H */ #endif /* __WINE_DRIVE_H */
...@@ -3305,6 +3305,10 @@ typedef enum tagSID_NAME_USE { ...@@ -3305,6 +3305,10 @@ typedef enum tagSID_NAME_USE {
#define FILE_PERSISTENT_ACLS 0x00000008 #define FILE_PERSISTENT_ACLS 0x00000008
#define FILE_FILE_COMPRESSION 0x00000010 #define FILE_FILE_COMPRESSION 0x00000010
#define FILE_VOLUME_IS_COMPRESSED 0x00008000 #define FILE_VOLUME_IS_COMPRESSED 0x00008000
#define FILE_SUPPORTS_OBJECT_IDS 0x00010000
#define FILE_SUPPORTS_ENCRYPTION 0x00020000
#define FILE_NAMED_STREAMS 0x00040000
#define FILE_READ_ONLY_VOLUME 0x00080000
/* File alignments (NT) */ /* File alignments (NT) */
#define FILE_BYTE_ALIGNMENT 0x00000000 #define FILE_BYTE_ALIGNMENT 0x00000000
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment