Commit f36690d4 authored by Alexandre Julliard's avatar Alexandre Julliard

mountmgr: Create devices and symlinks for dynamic drives too.

parent 7033120f
......@@ -120,6 +120,17 @@ struct mount_point *add_volume_mount_point( DEVICE_OBJECT *device, UNICODE_STRIN
return add_mount_point( device, device_name, link, id, id_len );
}
/* delete the mount point symlinks when a device goes away */
void delete_mount_point( struct mount_point *mount )
{
TRACE( "deleting %s\n", debugstr_w(mount->link.Buffer) );
list_remove( &mount->entry );
RegDeleteValueW( mount_key, mount->link.Buffer );
IoDeleteSymbolicLink( &mount->link );
RtlFreeHeap( GetProcessHeap(), 0, mount->id );
RtlFreeHeap( GetProcessHeap(), 0, mount );
}
/* check if a given mount point matches the requested specs */
static BOOL matching_mount_point( const struct mount_point *mount, const MOUNTMGR_MOUNT_POINT *spec )
{
......
......@@ -51,4 +51,5 @@ extern struct mount_point *add_dosdev_mount_point( DEVICE_OBJECT *device, UNICOD
int drive, const void *id, unsigned int id_len );
extern struct mount_point *add_volume_mount_point( DEVICE_OBJECT *device, UNICODE_STRING *device_name,
int drive, const void *id, unsigned int id_len );
extern void delete_mount_point( struct mount_point *mount );
extern void set_mount_point_id( struct mount_point *mount, const void *id, unsigned int id_len );
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