linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Marco d'Itri" <md@Linux.IT>
To: linux-hotplug@vger.kernel.org
Subject: [PATCH] small ide-devfs.sh fix
Date: Tue, 23 Mar 2004 19:25:27 +0000	[thread overview]
Message-ID: <20040323192527.GA9370@wonderland.linux.it> (raw)

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

The file may not exist and errors would be spewed on the console.

-- 
ciao, |
Marco | [5277 scT00UUIjEiXA]

[-- Attachment #2: ide-devfs_fix_no_media --]
[-- Type: text/plain, Size: 520 bytes --]

diff -ruNp udev-022.orig/extras/ide-devfs.sh udev-022/extras/ide-devfs.sh
--- udev-022.orig/extras/ide-devfs.sh	2004-03-13 00:53:56.000000000 +0100
+++ udev-022/extras/ide-devfs.sh	2004-03-21 13:30:23.000000000 +0100
@@ -35,7 +35,7 @@ get_dev_number() {
 	echo $((${num} - 1))
 }
 
-if [ -z "$3" ]; then
+if [ -z "$3" -a -f /proc/ide/${1}/media ]; then
 	MEDIA=`cat /proc/ide/${1}/media`
 	if [ "${MEDIA}" = "cdrom" ]; then
 		echo ide/host${HOST}/bus${BUS}/target${TARGET}/lun0/cd cdroms/cdrom`get_dev_number $1 cdrom`

             reply	other threads:[~2004-03-23 19:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-23 19:25 Marco d'Itri [this message]
2004-03-27  1:21 ` [PATCH] small ide-devfs.sh fix Greg KH

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=20040323192527.GA9370@wonderland.linux.it \
    --to=md@linux.it \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).