search for: 7c690f8

Displaying 2 results from an estimated 2 matches for "7c690f8".

2016 Mar 02
1
[PATCH] daemon: do not fail list-disk-labels w/o labels set
...sts, causing list-disk-labels to fail with ENOENT. In this situation, act as if the directory was there, but empty. --- daemon/devsparts.c | 7 +++++++ generator/actions.ml | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/daemon/devsparts.c b/daemon/devsparts.c index 7b92bf6..7c690f8 100644 --- a/daemon/devsparts.c +++ b/daemon/devsparts.c @@ -316,6 +316,13 @@ do_list_disk_labels (void) dir = opendir (GUESTFSDIR); if (!dir) { + if (errno == ENOENT) { + /* The directory does not exist, and usually this happens when + * there are no labels set. In this case...
2016 Jul 07
2
[PATCH 1/2] daemon: free the string on stringsbuf add failure
...tring_nodup (&ret, ss) == -1) { - free (ss); + if (add_string_nodup (&ret, ss) == -1) return NULL; - } } else { if (add_string (&ret, "") == -1) return NULL; diff --git a/daemon/devsparts.c b/daemon/devsparts.c index 7c690f8..41c728c 100644 --- a/daemon/devsparts.c +++ b/daemon/devsparts.c @@ -311,7 +311,6 @@ do_list_disk_labels (void) { DIR *dir = NULL; struct dirent *d; - char *rawdev = NULL; DECLARE_STRINGSBUF (ret); dir = opendir (GUESTFSDIR); @@ -330,6 +329,7 @@ do_list_disk_labels (void) errno...