hal/hald/linux2/addons addon-storage.c,1.5,1.6
David Zeuthen
david at freedesktop.org
Mon May 2 09:09:01 PDT 2005
Update of /cvs/hal/hal/hald/linux2/addons
In directory gabe:/tmp/cvs-serv26796/hald/linux2/addons
Modified Files:
addon-storage.c
Log Message:
2005-05-02 David Zeuthen <davidz at redhat.com>
* hald/linux2/addons/addon-storage.c (unmount_childs): Also unmount
by mount point here
Index: addon-storage.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/addons/addon-storage.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- addon-storage.c 8 Apr 2005 18:10:20 -0000 1.5
+++ addon-storage.c 2 May 2005 16:08:59 -0000 1.6
@@ -48,7 +48,7 @@
#include "../probing/shared.h"
static void
-force_unmount (const char *device_file)
+force_unmount (const char *device_file_or_mount_point)
{
pid_t pid;
@@ -56,7 +56,7 @@
case -1:
break;
case 0:
- execl ("/bin/umount", "-l", device_file);
+ execl ("/bin/umount", "-l", device_file_or_mount_point);
break;
default:
waitpid (pid, NULL, 0);
@@ -85,17 +85,18 @@
if (libhal_device_get_property_bool (ctx, vol_udi, "block.is_volume", &error)) {
dbus_error_init (&error);
if (libhal_device_get_property_bool (ctx, vol_udi, "volume.is_mounted", &error)) {
- char *vol_device_file;
+ char *vol_mount_point;
dbus_error_init (&error);
- vol_device_file = libhal_device_get_property_string (ctx, vol_udi,
- "block.device", &error);
- if (vol_device_file != NULL) {
- dbg ("Forcing unmount for %s", vol_device_file);
+ vol_mount_point = libhal_device_get_property_string (ctx, vol_udi,
+ "volume.mount_point",
+ &error);
+ if (vol_mount_point != NULL) {
+ dbg ("Forcing unmount for %s", vol_mount_point);
/* TODO: emit DeviceCondition */
- force_unmount (vol_device_file);
- libhal_free_string (vol_device_file);
+ force_unmount (vol_mount_point);
+ libhal_free_string (vol_mount_point);
}
}
}
More information about the hal-commit
mailing list