# Description: volume.num_blocks can become larger than 2G # Ubuntu: https://launchpad.net/bugs/209483 # Upstream: http://lists.freedesktop.org/archives/hal/2008-July/012039.html diff -Nur -x '*.orig' -x '*~' ubuntu/hald/linux/blockdev.c ubuntu.new/hald/linux/blockdev.c --- ubuntu/hald/linux/blockdev.c 2008-07-21 16:04:47.000000000 +0200 +++ ubuntu.new/hald/linux/blockdev.c 2008-07-21 16:07:56.000000000 +0200 @@ -1436,13 +1436,13 @@ * (block size requires opening the device file) */ hal_device_property_set_int (d, "volume.block_size", 512); - if (!hal_util_set_int_from_file (d, "volume.num_blocks", sysfs_path_real, "size", 0)) { + if (!hal_util_set_uint64_from_file (d, "volume.num_blocks", sysfs_path_real, "size", 0)) { HAL_INFO (("Ignoring hotplug event - cannot read 'size'")); goto error; } hal_device_property_set_uint64 ( d, "volume.size", - ((dbus_uint64_t)(512)) * ((dbus_uint64_t)(hal_device_property_get_int (d, "volume.num_blocks")))); + ((dbus_uint64_t)(512)) * ((dbus_uint64_t)(hal_device_property_get_uint64 (d, "volume.num_blocks")))); /* TODO: move to prober? */ if (is_physical_partition) { guint64 start_block;