Bug 27072 — does not force-unmount for drives in fstab
authorMartin Pitt <martin.pitt@ubuntu.com>
Sun, 14 Mar 2010 19:58:28 +0000 (20:58 +0100)
committerMartin Pitt <martin.pitt@ubuntu.com>
Sun, 14 Mar 2010 19:58:28 +0000 (20:58 +0100)
force_removal() previously only checked for entries in our own mtab.
This caused forced unmounts for drives in /etc/fstab not to work.

Now check for drives in /etc/fstab as well.

src/device.c

index 26b7329..8063811 100644 (file)
@@ -11743,7 +11743,8 @@ force_removal (Device *device,
     {
       gboolean remove_dir_on_unmount;
 
-      if (mount_file_has_device (device->priv->device_file, NULL, &remove_dir_on_unmount))
+      if (mount_file_has_device (device->priv->device_file, NULL, &remove_dir_on_unmount) ||
+          is_device_in_fstab (device, NULL))
         {
           g_print ("**** NOTE: Force unmounting device %s\n", device->priv->device_file);
           force_unmount (device, callback, user_data);