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
9c02e01d
Commit
9c02e01d
authored
Mar 03, 2008
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Apr 22, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorer/mountmgr.sys: Move device hotplug code over to mount manager.
parent
6e59cd2c
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
53 additions
and
25 deletions
+53
-25
Makefile.in
dlls/mountmgr.sys/Makefile.in
+6
-0
device.c
dlls/mountmgr.sys/device.c
+4
-4
diskarb.c
dlls/mountmgr.sys/diskarb.c
+5
-5
hal.c
dlls/mountmgr.sys/hal.c
+9
-9
mountmgr.c
dlls/mountmgr.sys/mountmgr.c
+4
-0
mountmgr.h
dlls/mountmgr.sys/mountmgr.h
+25
-0
Makefile.in
programs/explorer/Makefile.in
+0
-5
desktop.c
programs/explorer/desktop.c
+0
-2
No files found.
dlls/mountmgr.sys/Makefile.in
View file @
9c02e01d
...
...
@@ -4,9 +4,15 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
mountmgr.sys
IMPORTS
=
advapi32 ntoskrnl.exe kernel32 ntdll
DELAYIMPORTS
=
user32
EXTRADLLFLAGS
=
-Wb
,--subsystem,native
EXTRADEFS
=
@HALINCL@
EXTRALIBS
=
@DISKARBITRATIONLIB@
-luuid
C_SRCS
=
\
device.c
\
diskarb.c
\
hal.c
\
mountmgr.c
@MAKE_DLL_RULES@
...
...
programs/explorer
/device.c
→
dlls/mountmgr.sys
/device.c
View file @
9c02e01d
...
...
@@ -37,7 +37,7 @@
#include "wine/list.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
explore
r
);
WINE_DEFAULT_DEBUG_CHANNEL
(
mountmg
r
);
struct
dos_drive
{
...
...
@@ -72,8 +72,8 @@ static void send_notify( int drive, int code )
info
.
dbcv_reserved
=
0
;
info
.
dbcv_unitmask
=
1
<<
drive
;
info
.
dbcv_flags
=
DBTF_MEDIA
;
SendMessageTimeoutW
(
HWND_BROADCAST
,
WM_DEVICECHANGE
,
code
,
(
LPARAM
)
&
info
,
SMTO_ABORTIFHUNG
,
0
,
&
result
);
result
=
BroadcastSystemMessageW
(
BSF_FORCEIFHUNG
|
BSF_QUERY
,
NULL
,
WM_DEVICECHANGE
,
code
,
(
LPARAM
)
&
info
);
}
static
inline
int
is_valid_device
(
struct
stat
*
st
)
...
...
@@ -213,7 +213,7 @@ found:
set_mount_point
(
drive
,
mount_point
);
WINE_
TRACE
(
"added device %c: udi %s for %s on %s type %s
\n
"
,
TRACE
(
"added device %c: udi %s for %s on %s type %s
\n
"
,
'a'
+
drive
->
drive
,
wine_dbgstr_a
(
udi
),
wine_dbgstr_a
(
device
),
wine_dbgstr_a
(
mount_point
),
wine_dbgstr_a
(
type
)
);
...
...
programs/explorer
/diskarb.c
→
dlls/mountmgr.sys
/diskarb.c
View file @
9c02e01d
...
...
@@ -33,9 +33,9 @@
#include "winuser.h"
#include "wine/debug.h"
#include "
explorer_private
.h"
#include "
mountmgr
.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
explore
r
);
WINE_DEFAULT_DEBUG_CHANNEL
(
mountmg
r
);
#ifdef HAVE_DISKARBITRATION_DISKARBITRATION_H
...
...
@@ -72,7 +72,7 @@ static void appeared_callback( DADiskRef disk, void *context )
type
=
"cdrom"
;
}
WINE_
TRACE
(
"got mount notification for '%s' on '%s'
\n
"
,
device
,
mount_point
);
TRACE
(
"got mount notification for '%s' on '%s'
\n
"
,
device
,
mount_point
);
add_dos_device
(
device
,
device
,
mount_point
,
type
);
done:
...
...
@@ -101,7 +101,7 @@ static void disappeared_callback( DADiskRef disk, void *context )
strcpy
(
device
,
"/dev/r"
);
CFStringGetCString
(
ref
,
device
+
6
,
sizeof
(
device
)
-
6
,
kCFStringEncodingASCII
);
WINE_
TRACE
(
"got unmount notification for '%s'
\n
"
,
device
);
TRACE
(
"got unmount notification for '%s'
\n
"
,
device
);
remove_dos_device
(
device
);
done:
...
...
@@ -139,7 +139,7 @@ void initialize_diskarbitration(void)
void
initialize_diskarbitration
(
void
)
{
WINE_
TRACE
(
"Skipping, Disk Arbitration support not compiled in
\n
"
);
TRACE
(
"Skipping, Disk Arbitration support not compiled in
\n
"
);
}
#endif
/* HAVE_DISKARBITRATION_DISKARBITRATION_H */
programs/explorer
/hal.c
→
dlls/mountmgr.sys
/hal.c
View file @
9c02e01d
...
...
@@ -36,9 +36,9 @@
#include "wine/library.h"
#include "wine/exception.h"
#include "wine/debug.h"
#include "
explorer_private
.h"
#include "
mountmgr
.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
explore
r
);
WINE_DEFAULT_DEBUG_CHANNEL
(
mountmg
r
);
#ifdef SONAME_LIBHAL
...
...
@@ -98,7 +98,7 @@ static BOOL load_functions(void)
return
TRUE
;
failed:
W
INE_W
ARN
(
"failed to load HAL support: %s
\n
"
,
error
);
WARN
(
"failed to load HAL support: %s
\n
"
,
error
);
return
FALSE
;
}
...
...
@@ -153,7 +153,7 @@ static void removed_device( LibHalContext *ctx, const char *udi )
{
DBusError
error
;
WINE_
TRACE
(
"removed %s
\n
"
,
wine_dbgstr_a
(
udi
)
);
TRACE
(
"removed %s
\n
"
,
wine_dbgstr_a
(
udi
)
);
if
(
remove_dos_device
(
udi
))
{
...
...
@@ -167,7 +167,7 @@ static void removed_device( LibHalContext *ctx, const char *udi )
static
void
property_modified
(
LibHalContext
*
ctx
,
const
char
*
udi
,
const
char
*
key
,
dbus_bool_t
is_removed
,
dbus_bool_t
is_added
)
{
WINE_
TRACE
(
"udi %s key %s %s
\n
"
,
wine_dbgstr_a
(
udi
),
wine_dbgstr_a
(
key
),
TRACE
(
"udi %s key %s %s
\n
"
,
wine_dbgstr_a
(
udi
),
wine_dbgstr_a
(
key
),
is_added
?
"added"
:
is_removed
?
"removed"
:
"modified"
);
if
(
!
strcmp
(
key
,
"volume.mount_point"
))
new_device
(
ctx
,
udi
);
...
...
@@ -187,7 +187,7 @@ static DWORD WINAPI hal_thread( void *arg )
p_dbus_error_init
(
&
error
);
if
(
!
(
dbc
=
p_dbus_bus_get
(
DBUS_BUS_SYSTEM
,
&
error
)))
{
W
INE_W
ARN
(
"failed to get system dbus connection: %s
\n
"
,
error
.
message
);
WARN
(
"failed to get system dbus connection: %s
\n
"
,
error
.
message
);
p_dbus_error_free
(
&
error
);
return
1
;
}
...
...
@@ -199,7 +199,7 @@ static DWORD WINAPI hal_thread( void *arg )
if
(
!
p_libhal_ctx_init
(
ctx
,
&
error
))
{
W
INE_W
ARN
(
"HAL context init failed: %s
\n
"
,
error
.
message
);
WARN
(
"HAL context init failed: %s
\n
"
,
error
.
message
);
p_dbus_error_free
(
&
error
);
return
1
;
}
...
...
@@ -218,7 +218,7 @@ static DWORD WINAPI hal_thread( void *arg )
}
__EXCEPT
(
assert_fault
)
{
W
INE_W
ARN
(
"dbus assertion failure, disabling HAL support
\n
"
);
WARN
(
"dbus assertion failure, disabling HAL support
\n
"
);
return
1
;
}
__ENDTRY
;
...
...
@@ -243,7 +243,7 @@ void initialize_hal(void)
void
initialize_hal
(
void
)
{
WINE_
TRACE
(
"Skipping, HAL support not compiled in
\n
"
);
TRACE
(
"Skipping, HAL support not compiled in
\n
"
);
}
#endif
/* SONAME_LIBHAL */
dlls/mountmgr.sys/mountmgr.c
View file @
9c02e01d
...
...
@@ -38,6 +38,7 @@
#include "wine/library.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "mountmgr.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mountmgr
);
...
...
@@ -493,6 +494,9 @@ NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path )
return
status
;
}
initialize_hal
();
initialize_diskarbitration
();
RtlInitUnicodeString
(
&
nameW
,
harddiskW
);
status
=
IoCreateDriver
(
&
nameW
,
harddisk_driver_entry
);
...
...
dlls/mountmgr.sys/mountmgr.h
0 → 100644
View file @
9c02e01d
/*
* Mountmanager private header
*
* Copyright 2008 Maarten Lankhorst
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
extern
void
initialize_hal
(
void
);
extern
void
initialize_diskarbitration
(
void
);
extern
BOOL
add_dos_device
(
const
char
*
udi
,
const
char
*
device
,
const
char
*
mount_point
,
const
char
*
type
);
extern
BOOL
remove_dos_device
(
const
char
*
udi
);
programs/explorer/Makefile.in
View file @
9c02e01d
...
...
@@ -6,15 +6,10 @@ MODULE = explorer.exe
APPMODE
=
-mwindows
IMPORTS
=
rpcrt4 user32 gdi32 advapi32 kernel32 ntdll
DELAYIMPORTS
=
comctl32
EXTRADEFS
=
@HALINCL@
EXTRALIBS
=
@DISKARBITRATIONLIB@
C_SRCS
=
\
desktop.c
\
device.c
\
diskarb.c
\
explorer.c
\
hal.c
\
systray.c
@MAKE_PROG_RULES@
...
...
programs/explorer/desktop.c
View file @
9c02e01d
...
...
@@ -234,8 +234,6 @@ void manage_desktop( char *arg )
SystemParametersInfoA
(
SPI_SETDESKPATTERN
,
-
1
,
NULL
,
FALSE
);
SetDeskWallPaper
(
(
LPSTR
)
-
1
);
initialize_display_settings
(
hwnd
);
initialize_diskarbitration
();
initialize_hal
();
initialize_systray
();
}
else
...
...
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