diff -Nur hal-0.5.7.1/build-tree/hal-0.5.7.1/hald/linux2/blockdev.c hal-0.5.7.1.new/build-tree/hal-0.5.7.1/hald/linux2/blockdev.c --- hal-0.5.7.1/hald/linux2/blockdev.c 2006-10-04 20:00:09.000000000 +0200 +++ hal-0.5.7.1/hald/linux2/blockdev.c 2006-10-04 20:16:52.000000000 +0200 @@ -205,10 +205,11 @@ while ((mnte = getmntent_r (f, &mnt, buf, sizeof(buf))) != NULL) { struct stat statbuf; - /* check the underlying device of the mount point */ - if (stat (mnt.mnt_dir, &statbuf) != 0) + /* get major:minor of special device file */ + if (stat (mnt.mnt_fsname, &statbuf) != 0) continue; - if (major(statbuf.st_dev) == 0) + + if (major (statbuf.st_rdev) == 0) continue; HAL_INFO (("* found mounts dev %s (%i:%i)", mnt.mnt_fsname, major(statbuf.st_dev), minor(statbuf.st_dev))); @@ -224,7 +225,7 @@ devt = makedev(major, minor); HAL_INFO ((" match %s (%i:%i)", hal_device_get_udi (dev), major, minor)); - if (statbuf.st_dev == devt) { + if (statbuf.st_rdev == devt) { /* found entry for this device in /proc/mounts */ device_property_atomic_update_begin (); hal_device_property_set_bool (dev, "volume.is_mounted", TRUE);