PATCH: minor cleanup patch for udev-095/scsi_id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi ,

With udev-095 , when scsi_id fails for "scsi_id -g -u -s /block/ram1"
it leaves behind a temp nod under /dev, following patch adds a unlink for this kind of failure. Please let me know if this makes sense.

Thanks,
-Guru
--- udev-095.orig/extras/scsi_id/scsi_id.c	2010-02-04 00:30:19.000000000 -0800
+++ udev-095/extras/scsi_id/scsi_id.c	2010-02-04 00:30:39.000000000 -0800
@@ -674,6 +674,8 @@ static int scsi_id(const char *devpath, 
 		dev_scsi = sysfs_device_get_parent_with_subsystem(dev, "scsi");
 		if (dev_scsi == NULL) {
 			err("unable to access parent device of '%s'", devpath);
+			if (!dev_specified)
+				unlink(maj_min_dev);				
 			return 1;
 		}
 		set_sysfs_values(dev_scsi);

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux