mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

40 lines
1.6 KiB

# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/base/udev/scsi_dev_discs.patch
# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
diff -pruN udev-068-orig/extras/scsi-devfs.sh udev-068/extras/scsi-devfs.sh
--- udev-068-orig/extras/scsi-devfs.sh 2005-10-11 17:33:26.000000000 +0200
+++ udev-068/extras/scsi-devfs.sh 2005-10-12 10:17:44.000000000 +0200
@@ -83,6 +83,16 @@ l_pci="domain$pci_domain/bus$pci_bus/slo
l_phy="bus/pci/$l_pci/scsi/$l_com"
s_phy="$1/pci/$pci_addr/$s_com"
-echo $l_phy $s_phy $l_log $s_log
+for x in /dev/discs/disc* ; do
+ if readlink $x/disc | grep -q "$l_pci" ; then
+ x=`echo $x | cut -f3 -dc` # gives the number in disc0
+ break
+ fi
+ unset x
+done
+if [ -z "${x}" ] ; then
+ x="`ls /dev/discs/ | grep -c .`"
+fi
+echo $l_phy $s_phy $l_log $s_log discs/disc${x}/${lpart}