Skip to contentSkip to conversation

PATCH: minor cleanup patch for udev-095/scsi_id

PATCH Gurudas Pai 2 participants 2 messages Feb 4, 2010

lore
Share & tools
lore
#0 lore raw

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

extras/scsi_id/scsi_id.c +2 -0
@@ -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);
#1 lore raw
Quoted 3 lines · Gurudas Pai

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.

This code was removed almost two years ago. So this should not be an issue with the current code.

Thanks,
Kay