From db1aacb8e0ac28283e1d9f7d02119868de19836b Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Thu, 7 May 2009 16:57:55 +0100 Subject: [PATCH] /dev/hd* is also a block device on RHEL 5. --- daemon/devsparts.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/daemon/devsparts.c b/daemon/devsparts.c index 324b887..0a4d5e4 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'; -- 1.8.3.1