All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gurudas Pai <gurudas.pai@oracle.com>
To: linux-hotplug@vger.kernel.org
Subject: PATCH: minor cleanup patch for udev-095/scsi_id
Date: Thu, 04 Feb 2010 08:10:03 +0000	[thread overview]
Message-ID: <4B6A7E0B.5020601@oracle.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 229 bytes --]

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

[-- Attachment #2: cleanup-temp-nod.patch --]
[-- Type: text/x-patch, Size: 472 bytes --]

--- 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);

             reply	other threads:[~2010-02-04  8:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-04  8:10 Gurudas Pai [this message]
2010-02-04 21:44 ` PATCH: minor cleanup patch for udev-095/scsi_id Kay Sievers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B6A7E0B.5020601@oracle.com \
    --to=gurudas.pai@oracle.com \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.