Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6cf1b31d
Commit
6cf1b31d
authored
Feb 25, 2005
by
Paul van Schayck
Committed by
Alexandre Julliard
Feb 25, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
As last option for drive type detection we try the device node name.
parent
8922da9e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
3 deletions
+30
-3
drivedetect.c
programs/winecfg/drivedetect.c
+24
-3
properties.h
programs/winecfg/properties.h
+6
-0
No files found.
programs/winecfg/drivedetect.c
View file @
6cf1b31d
...
...
@@ -43,6 +43,13 @@ BOOL gui_mode = TRUE;
static
long
working_mask
=
0
;
#ifdef HAVE_MNTENT_H
static
DEV_NODES
sDeviceNodes
[]
=
{
{
"/dev/fd"
,
DRIVE_REMOVABLE
},
{
"/dev/cdrom"
,
DRIVE_CDROM
},
{
""
,
0
}
};
static
char
*
ignored_fstypes
[]
=
{
"devpts"
,
"tmpfs"
,
...
...
@@ -59,6 +66,20 @@ static char *ignored_mnt_dirs[] = {
NULL
};
static
int
try_dev_node
(
char
*
dev
)
{
const
DEV_NODES
*
pDevNodes
=
sDeviceNodes
;
while
(
pDevNodes
->
szNode
[
0
])
{
if
(
!
strncmp
(
dev
,
pDevNodes
->
szNode
,
strlen
(
pDevNodes
->
szNode
)))
return
pDevNodes
->
nType
;
++
pDevNodes
;
}
return
DRIVE_FIXED
;
}
static
BOOL
should_ignore_fstype
(
char
*
type
)
{
char
**
s
;
...
...
@@ -288,11 +309,11 @@ int autodetect_drives()
fclose
(
fstab
);
return
FALSE
;
}
WINE_TRACE
(
"adding drive %c for %s, type %s
\n
"
,
letter
,
ent
->
mnt_dir
,
ent
->
mnt_type
);
strncpy
(
label
,
"Drive X"
,
8
);
label
[
6
]
=
letter
;
WINE_TRACE
(
"adding drive %c for %s, type %s with label %s
\n
"
,
letter
,
ent
->
mnt_dir
,
ent
->
mnt_type
,
label
);
if
(
!
strcmp
(
ent
->
mnt_type
,
"nfs"
))
type
=
DRIVE_REMOTE
;
else
if
(
!
strcmp
(
ent
->
mnt_type
,
"nfs4"
))
type
=
DRIVE_REMOTE
;
...
...
@@ -301,7 +322,7 @@ int autodetect_drives()
else
if
(
!
strcmp
(
ent
->
mnt_type
,
"coda"
))
type
=
DRIVE_REMOTE
;
else
if
(
!
strcmp
(
ent
->
mnt_type
,
"iso9660"
))
type
=
DRIVE_CDROM
;
else
if
(
!
strcmp
(
ent
->
mnt_type
,
"ramfs"
))
type
=
DRIVE_RAMDISK
;
else
type
=
DRIVE_FIXED
;
else
type
=
try_dev_node
(
ent
->
mnt_fsname
)
;
add_drive
(
letter
,
ent
->
mnt_dir
,
label
,
"0"
,
type
);
...
...
programs/winecfg/properties.h
View file @
6cf1b31d
...
...
@@ -87,6 +87,12 @@ typedef struct
int
nSynchronous
;
}
X11DRV_DESC
;
typedef
struct
{
char
szNode
[
MAX_NAME_LENGTH
];
int
nType
;
}
DEV_NODES
;
VERSION_DESC
*
getWinVersions
(
void
);
VERSION_DESC
*
getDOSVersions
(
void
);
DLL_DESC
*
getDLLDefaults
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment