807f1fa07f
Signed-off-by: David Zeuthen <davidz@redhat.com>
41 lines
1.7 KiB
Diff
41 lines
1.7 KiB
Diff
From 5dd2ef0710584626f81a89b81180fa81d04b6956 Mon Sep 17 00:00:00 2001
|
|
From: Edward Sheldrake <ejsheldrake@gmail.com>
|
|
Date: Sun, 1 Apr 2012 15:58:08 +0100
|
|
Subject: [PATCH] Fix unmounting large disks when not asked to
|
|
|
|
udisks2 was "Cleaning up mount point" claiming the device no longer existed.
|
|
Disk size may be larger than INT_MAX for large disks.
|
|
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=48155
|
|
|
|
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
---
|
|
src/udiskscleanup.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/udiskscleanup.c b/src/udiskscleanup.c
|
|
index b5b61c1..9daa980 100644
|
|
--- a/src/udiskscleanup.c
|
|
+++ b/src/udiskscleanup.c
|
|
@@ -605,7 +605,7 @@ udisks_cleanup_check_mounted_fs_entry (UDisksCleanup *cleanup,
|
|
/* if umounting, issue 'change' event on the device after unmounting it */
|
|
change_sysfs_path = g_strdup (g_udev_device_get_sysfs_path (udev_device));
|
|
|
|
- if (g_udev_device_get_sysfs_attr_as_int (udev_device, "size") > 0)
|
|
+ if (g_udev_device_get_sysfs_attr_as_uint64 (udev_device, "size") > 0)
|
|
{
|
|
/* for partition, also check enclosing device */
|
|
if (g_strcmp0 (g_udev_device_get_devtype (udev_device), "partition") == 0)
|
|
@@ -614,7 +614,7 @@ udisks_cleanup_check_mounted_fs_entry (UDisksCleanup *cleanup,
|
|
udev_device_disk = g_udev_device_get_parent_with_subsystem (udev_device, "block", "disk");
|
|
if (udev_device_disk != NULL)
|
|
{
|
|
- if (g_udev_device_get_sysfs_attr_as_int (udev_device_disk, "size") > 0)
|
|
+ if (g_udev_device_get_sysfs_attr_as_uint64 (udev_device_disk, "size") > 0)
|
|
{
|
|
device_exists = TRUE;
|
|
}
|
|
--
|
|
1.7.9.3
|
|
|