Skip to contentSkip to conversation

small ide-devfs.sh fix

PATCH Applied Marco d'Itri 2 participants 2 messages Mar 23, 2004 – Mar 27, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 small ide-devfs.sh fix

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

Signature · 2 lines
ciao, |
Marco | [5277 scT00UUIjEiXA]
extras/ide-devfs.sh +1 -1
diff -ruNp udev-022.orig/extras/ide-devfs.sh udev-022/extras/ide-devfs.sh
@@ -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`
Applied
#1 lore raw
Quoted 1 line · Marco d'Itri

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

Applied, thanks.

greg k-h

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel