[Pkg-utopia-maintainers] Bug#517325: hal: Partitions larger than 1TB are not added as the number of sectors overflows strtol
Nigel Tamplin
fuse at f2s.com
Thu Feb 26 23:28:42 UTC 2009
Package: hal
Version: 0.5.11-8
Severity: important
When attaching a large USB drive hald does not add the device, preventing it from being automounted.
20:39:10.581 [I] osspec.c:966: hal_util_find_known_parent: '/sys/block/sda/sda1'->'/sys/block/sda'
20:39:10.581 [I] blockdev.c:874: block_add: sysfs_path=/sys/block/sda/sda1 dev=/dev/sda1 is_part=1,
parent=0x080d2da0
20:39:10.583 [I] blockdev.c:1440: Ignoring hotplug event - cannot read 'size'
20:39:10.583 [W] blockdev.c:1473: Not adding device object
The above message is displayed when I connect my 1.5TB USB drive.
The cause of the problem is the call to strtol from within function
hal_util_get_int_from_file (const gchar *directory, const gchar *file, gint *result, gint base)
in file hald/util.c
My drive has a single partition with 2930272002 512-byte sectors, this number is too large for
strtol which fails setting errno=ERANGE, which in turn causes the function to fail.
It would appear that any partition with more than 2147483647 512-byte sectors (1TiB) will overflow
strtol.
-- System Information:
Debian Release: 5.0
APT prefers stable
APT policy: (700, 'stable'), (600, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.18-6-686 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages hal depends on:
ii adduser 3.110 add and remove users and groups
ii dbus 1.2.1-5 simple interprocess messaging syst
ii hal-info 20080508+git20080601-1 Hardware Abstraction Layer - fdi f
ii libc6 2.7-18 GNU C Library: Shared libraries
ii libdbus-1-3 1.2.1-5 simple interprocess messaging syst
ii libdbus-glib-1-2 0.76-1 simple interprocess messaging syst
ii libexpat1 2.0.1-4 XML parsing C library - runtime li
ii libgcc1 1:4.3.2-1.1 GCC support library
ii libglib2.0-0 2.16.6-1 The GLib library of C routines
ii libhal-storage1 0.5.11-8 Hardware Abstraction Layer - share
ii libhal1 0.5.11-8 Hardware Abstraction Layer - share
ii libsmbios2 2.0.3.dfsg-1 Provide access to (SM)BIOS informa
ii libstdc++6 4.3.2-1.1 The GNU Standard C++ Library v3
ii libusb-0.1-4 2:0.1.12-13 userspace USB programming library
ii libvolume-id0 0.125-7 libvolume_id shared library
ii lsb-base 3.2-20 Linux Standard Base 3.2 init scrip
ii mount 2.13.1.1-1 Tools for mounting and manipulatin
ii pciutils 1:3.0.0-6 Linux PCI Utilities
ii pm-utils 1.1.2.4-1 utilities and scripts for power ma
ii udev 0.125-7 /dev/ and hotplug management daemo
ii usbutils 0.73-10 Linux USB utilities
Versions of packages hal recommends:
ii eject 2.1.5+deb1-4 ejects CDs and operates CD-Changer
ii libsmbios-bin 2.0.3.dfsg-1 Provide access to (SM)BIOS informa
Versions of packages hal suggests:
pn gnome-device-manager <none> (no description available)
-- no debconf information
More information about the Pkg-utopia-maintainers
mailing list