From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gurudas Pai Date: Thu, 04 Feb 2010 08:10:03 +0000 Subject: PATCH: minor cleanup patch for udev-095/scsi_id Message-Id: <4B6A7E0B.5020601@oracle.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------060002070301080601000005" List-Id: To: linux-hotplug@vger.kernel.org This is a multi-part message in MIME format. --------------060002070301080601000005 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 --------------060002070301080601000005 Content-Type: text/x-patch; name="cleanup-temp-nod.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cleanup-temp-nod.patch" --- 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); --------------060002070301080601000005--