[PATCH] get_dev_number() in extras/ide-devfs.sh

this patch corrects ide devices with number greater than 9 being linked
into wrong discs/discX directories (my hda10 device was in discs/disc1
directory)
it adds % into pattern for $DRIVE, so for example, hda10 is not eaten
to hda1, but to hda, and break in for cycle works for it
This commit is contained in:
elkropac@students.zcu.cz 2004-02-03 00:20:31 -08:00 committed by Greg KH
parent 786f923196
commit c7e2a0bc08
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ get_dev_number() {
local x=
local num=0
local MEDIA=
local DRIVE="${1%[0-9]*}"
local DRIVE="${1%%[0-9]*}"
for x in /proc/ide/*/media; do
if [ -e "${x}" ]; then