mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
[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:
committed by
Greg KH
parent
786f923196
commit
c7e2a0bc08
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user