diff options
author | Richard Jones <rjones@centos5x32.home.annexia.org> | 2009-05-07 16:57:55 +0100 |
---|---|---|
committer | Richard Jones <rjones@centos5x32.home.annexia.org> | 2009-05-07 16:57:55 +0100 |
commit | db1aacb8e0ac28283e1d9f7d02119868de19836b (patch) | |
tree | 22fd8f174ddddfdb5b6eb0592cc8485df571493b /daemon | |
parent | 74a31e619b6907caa80f987e16020edd85c9367f (diff) | |
download | libguestfs-db1aacb8e0ac28283e1d9f7d02119868de19836b.tar.gz libguestfs-db1aacb8e0ac28283e1d9f7d02119868de19836b.tar.xz libguestfs-db1aacb8e0ac28283e1d9f7d02119868de19836b.zip |
/dev/hd* is also a block device on RHEL 5.
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/devsparts.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/daemon/devsparts.c b/daemon/devsparts.c index 324b8870..0a4d5e46 100644 --- a/daemon/devsparts.c +++ b/daemon/devsparts.c @@ -45,7 +45,8 @@ do_list_devices (void) } while ((d = readdir (dir)) != NULL) { - if (strncmp (d->d_name, "sd", 2) == 0) { + if (strncmp (d->d_name, "sd", 2) == 0 || + strncmp (d->d_name, "hd", 2) == 0) { snprintf (buf, sizeof buf, "/dev/%s", d->d_name); if (add_string (&r, &size, &alloc, buf) == -1) { closedir (dir); @@ -85,7 +86,8 @@ do_list_partitions (void) } while ((d = readdir (dir)) != NULL) { - if (strncmp (d->d_name, "sd", 2) == 0) { + if (strncmp (d->d_name, "sd", 2) == 0 || + strncmp (d->d_name, "hd", 2) == 0) { strncpy (devname, d->d_name, sizeof devname); devname[sizeof devname - 1] = '\0'; |