dom0+vm: minor fixes in qvm-block scripts

This commit is contained in:
Marek Marczykowski 2011-09-30 11:20:03 +02:00
parent 5fc5301cee
commit aa08f555c3
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ fi
# Special case for CD
if [ "$ID_TYPE" = "cd" ]; then
if [ "$ID_MEDIA_CDROM" != "1" ]; then
if [ "$ID_CDROM_MEDIA" != "1" ]; then
# Hide empty cdrom drive
xenstore-rm "$XS_KEY"
exit 0

View File

@ -123,7 +123,7 @@ def block_name_to_devid(name):
return major << 8 | minor
def block_list(vm = None):
device_re = re.compile(r"^[a-z1-9]{1,8}$")
device_re = re.compile(r"^[a-z0-9]{1,8}$")
# FIXME: any better idea of desc_re?
desc_re = re.compile(r"^.{1,255}$")
mode_re = re.compile(r"^[rw]$")