From: Michal Novotny <minovotn@redhat.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] Blkif regular expression fix
Date: Thu, 05 Mar 2009 15:14:36 +0100 [thread overview]
Message-ID: <49AFDE4C.5020109@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 404 bytes --]
Hello everybody,
I have created a patch for blkif.py to support only hd[a-t] devices from
1 to 63. There was missing $ sign at the end of the regular expression
and therefore even hda100 was able to be attached but not working
correctly. Anyway hda989898 was able to be mounted but it crashed guest
kernel. This patch solves this issue...
Michal
Signed-off-by: Michal Novotny <minovotn@redhat.com>
[-- Attachment #2: xen-util-blkif-regex.patch --]
[-- Type: text/plain, Size: 796 bytes --]
diff -up xen-3.1.0-src/tools/python/xen/util/blkif.py.bz475433 xen-3.1.0-src/tools/python/xen/util/blkif.py
--- xen-3.1.0-src/tools/python/xen/util/blkif.py.bz475433 2009-03-05 14:51:35.000000000 +0100
+++ xen-3.1.0-src/tools/python/xen/util/blkif.py 2009-03-05 14:51:50.000000000 +0100
@@ -29,7 +29,7 @@ def blkdev_name_to_number(name):
if re.match( '/dev/sd[a-p]([1-9]|1[0-5])?$', n):
devnum = 8 * 256 + 16 * (ord(n[7:8]) - ord('a')) + int(n[8:] or 0)
- elif re.match( '/dev/hd[a-t]([1-9]|[1-5][0-9]|6[0-3])?', n):
+ elif re.match( '/dev/hd[a-t]([1-9]|[1-5][0-9]|6[0-3])?$', n):
ide_majors = [ 3, 22, 33, 34, 56, 57, 88, 89, 90, 91 ]
major = ide_majors[(ord(n[7:8]) - ord('a')) / 2]
minor = ((ord(n[7:8]) - ord('a')) % 2) * 64 + int(n[8:] or 0)
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2009-03-05 14:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49AFDE4C.5020109@redhat.com \
--to=minovotn@redhat.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.