mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
winecfg-Unmounted_Devices: Fix another compile issue on OSX.
This commit is contained in:
parent
2b4120187b
commit
92bc06bd9e
@ -1,13 +1,13 @@
|
||||
From 3e5b8bf7e113dbf266d8da3df50a8f65c212e932 Mon Sep 17 00:00:00 2001
|
||||
From be3a3e60612319a0e9ab51c673d868ebfefb7744 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 30 Mar 2015 04:38:21 +0200
|
||||
Subject: winecfg: Show unmounted devices and allow changing the device value.
|
||||
|
||||
---
|
||||
programs/winecfg/drive.c | 24 ++++++++++++------------
|
||||
programs/winecfg/drivedetect.c | 22 +++++++---------------
|
||||
programs/winecfg/drivedetect.c | 38 +++++++++++++++-----------------------
|
||||
programs/winecfg/driveui.c | 27 ++++++++++++++++++---------
|
||||
3 files changed, 37 insertions(+), 36 deletions(-)
|
||||
3 files changed, 45 insertions(+), 44 deletions(-)
|
||||
|
||||
diff --git a/programs/winecfg/drive.c b/programs/winecfg/drive.c
|
||||
index b5ef69d423..248ae800e1 100644
|
||||
@ -76,27 +76,46 @@ index b5ef69d423..248ae800e1 100644
|
||||
if (DeviceIoControl( mgr, IOCTL_MOUNTMGR_DEFINE_UNIX_DRIVE, ioctl, len, NULL, 0, NULL, NULL ))
|
||||
{
|
||||
diff --git a/programs/winecfg/drivedetect.c b/programs/winecfg/drivedetect.c
|
||||
index 253c6296a9..71d50c8ab8 100644
|
||||
index 253c6296a9..80f8e2e6bf 100644
|
||||
--- a/programs/winecfg/drivedetect.c
|
||||
+++ b/programs/winecfg/drivedetect.c
|
||||
@@ -131,12 +131,15 @@ static BOOL should_ignore_mnt_dir(char *dir)
|
||||
@@ -131,16 +131,6 @@ static BOOL should_ignore_mnt_dir(char *dir)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
-static BOOL is_drive_defined(char *path)
|
||||
+static BOOL is_drive_defined(const char *path)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 26; i++)
|
||||
-{
|
||||
- int i;
|
||||
-
|
||||
- for (i = 0; i < 26; i++)
|
||||
- if (drives[i].in_use && !strcmp(drives[i].unixpath, path)) return TRUE;
|
||||
-
|
||||
- return FALSE;
|
||||
-}
|
||||
-
|
||||
/* returns Z + 1 if there are no more available letters */
|
||||
static char allocate_letter(int type)
|
||||
{
|
||||
@@ -158,6 +148,19 @@ static char allocate_letter(int type)
|
||||
}
|
||||
#endif
|
||||
|
||||
+static BOOL is_drive_defined(const char *path)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < 26; i++)
|
||||
+ {
|
||||
+ if (!drives[i].in_use || !drives[i].unixpath) continue;
|
||||
+ if (!strcmp(drives[i].unixpath, path)) return TRUE;
|
||||
+ }
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
+
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
#define FSTAB_OPEN 1
|
||||
#define NO_MORE_LETTERS 2
|
||||
#define NO_ROOT 3
|
||||
@@ -222,13 +225,7 @@ static void report_error(int code)
|
||||
|
||||
static void ensure_root_is_mapped(void)
|
||||
|
Loading…
Reference in New Issue
Block a user