Displaying 2 results from an estimated 2 matches for "b764f63".
2017 Jan 19
3
[PATCH 1/2] daemon: Fix part-to-dev when the partition name includes p<N>.
...If the device name ends with a number, Linux uses partition names of
the form <device>p<N>. Handle this case by knocking off the 'p'
character.
---
daemon/devsparts.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/daemon/devsparts.c b/daemon/devsparts.c
index 5862ae2..b764f63 100644
--- a/daemon/devsparts.c
+++ b/daemon/devsparts.c
@@ -203,6 +203,9 @@ do_part_to_dev (const char *part)
return NULL;
}
+ if (part[n-1] == 'p')
+ n--;
+
char *r = strndup (part, n);
if (r == NULL) {
reply_with_perror ("strdup");
--
2.9.3
2017 Jan 19
0
[PATCH 2/2] daemon: Return MD partitions in guestfs_list_partitions (RHBZ#1414510).
From: Pino Toscano <ptoscano@redhat.com>
---
daemon/devsparts.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/daemon/devsparts.c b/daemon/devsparts.c
index b764f63..852ee99 100644
--- a/daemon/devsparts.c
+++ b/daemon/devsparts.c
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <stdbool.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
@@ -36,7 +37,7 @@ typedef int (*block_dev_func_t) (c...