Attaching a CDROM device with 'xm scsi-attach domU /dev/sr0 0:0:0:0'
fails because for some reason the sr driver was not handled at all in
the match list. With the change the above command succeeds and the
device is attached.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Matt Wilson <msw@amazon.com>
if re.match('/dev/sd[a-z]+([1-9]|1[0-5])?$', phyname):
# sd driver
name = re.sub('(^/dev/)|([1-9]|1[0-5])?$', '', phyname)
+ elif re.match('/dev/sr[0-9]+$', phyname):
+ # sr driver
+ name = re.sub('^/dev/', '', phyname)
elif re.match('/dev/sg[0-9]+$', phyname):
# sg driver
name = re.sub('^/dev/', '', phyname)