Displaying 11 results from an estimated 11 matches for "do_initrd_list".
2015 Sep 15
1
[PATCH] daemon: initrd: print return value from failing process
...guestfs: error: initrd_list: pclose: command failed with return code 1
---
daemon/initrd.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/daemon/initrd.c b/daemon/initrd.c
index ac14826..c9fc2dd 100644
--- a/daemon/initrd.c
+++ b/daemon/initrd.c
@@ -43,6 +43,7 @@ do_initrd_list (const char *path)
CLEANUP_FREE char *filename = NULL;
size_t allocsize;
ssize_t len;
+ int ret;
/* "zcat /sysroot/<path> | cpio --quiet -it", but path must be quoted. */
if (asprintf_nowarn (&cmd, "%s %R | %s --quiet -it", str_zcat, path, str_cpio) =...
2016 Jul 07
0
[PATCH 2/2] daemon: fix cleanup of stringsbuf usages
...if (r == -1) {
reply_with_perror ("vasprintf");
- free_stringslen (sb->argv, sb->size);
- sb->argv = NULL;
return -1;
}
diff --git a/daemon/initrd.c b/daemon/initrd.c
index c9fc2dd..21865de 100644
--- a/daemon/initrd.c
+++ b/daemon/initrd.c
@@ -39,7 +39,7 @@ do_initrd_list (const char *path)
{
FILE *fp;
CLEANUP_FREE char *cmd = NULL;
- DECLARE_STRINGSBUF (filenames);
+ CLEANUP_FREE_STRINGSBUF DECLARE_STRINGSBUF (filenames);
CLEANUP_FREE char *filename = NULL;
size_t allocsize;
ssize_t len;
@@ -84,11 +84,10 @@ do_initrd_list (const char *path)...
2016 Jul 07
2
[PATCH 1/2] daemon: free the string on stringsbuf add failure
If add_string_nodup fails free the passed string instead of leaking it,
as that string would have been owned by the stringbuf.
Adapt few places to this behaviour.
---
daemon/btrfs.c | 4 +---
daemon/devsparts.c | 8 ++++----
daemon/guestfsd.c | 1 +
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 9b52aa8..d70565a 100644
---
2012 Mar 13
2
[PATCH 0/2] 'int' to 'size_t' changes
These two patches are probably not completely independent, but
separating them is a lot of work.
With *both* patches applied, all the tests and extra-tests pass.
That's no guarantee however that there isn't a mistake, so I don't
think this patch is a candidate for the 1.16 branch, until it's had a
lot more testing in development.
Rich.
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...le, NULL);
}
diff --git a/daemon/initrd.c b/daemon/initrd.c
index 2ded14a..d9bc0f7 100644
--- a/daemon/initrd.c
+++ b/daemon/initrd.c
@@ -30,6 +30,9 @@
#include "daemon.h"
#include "actions.h"
+GUESTFSD_EXT_CMD(str_zcat, zcat);
+GUESTFSD_EXT_CMD(str_cpio, cpio);
+
char **
do_initrd_list (const char *path)
{
@@ -40,7 +43,7 @@ do_initrd_list (const char *path)
size_t len;
/* "zcat /sysroot/<path> | cpio --quiet -it", but path must be quoted. */
- if (asprintf_nowarn (&cmd, "zcat %R | cpio --quiet -it", path) == -1) {
+ if (asprintf_nowarn (&a...
2012 Aug 30
1
[PATCH] collect list of called external commands
...ttle, NULL);
}
diff --git a/daemon/initrd.c b/daemon/initrd.c
index 2ded14a..b066a8a 100644
--- a/daemon/initrd.c
+++ b/daemon/initrd.c
@@ -30,6 +30,9 @@
#include "daemon.h"
#include "actions.h"
+GUESTFS_EXT_CMD(str_zcat, zcat);
+GUESTFS_EXT_CMD(str_cpio, cpio);
+
char **
do_initrd_list (const char *path)
{
@@ -40,7 +43,7 @@ do_initrd_list (const char *path)
size_t len;
/* "zcat /sysroot/<path> | cpio --quiet -it", but path must be quoted. */
- if (asprintf_nowarn (&cmd, "zcat %R | cpio --quiet -it", path) == -1) {
+ if (asprintf_nowarn (&a...
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change.
I'll get back to that series shortly ;-)
It turned into a factorization and constification exercise
during which I got a taste of ocaml. Thanks to Rich Jones
for help with a few snippets in generator.ml.
The overall result is that many previously-manually-maintained
bits from daemon/*.c functions are now hoisted into the automatically-
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...eturn -1;
diff --git a/daemon/initrd.c b/daemon/initrd.c
index 21865debf..eb13cb92d 100644
--- a/daemon/initrd.c
+++ b/daemon/initrd.c
@@ -31,9 +31,6 @@
#include "daemon.h"
#include "actions.h"
-GUESTFSD_EXT_CMD(str_zcat, zcat);
-GUESTFSD_EXT_CMD(str_cpio, cpio);
-
char **
do_initrd_list (const char *path)
{
@@ -46,7 +43,7 @@ do_initrd_list (const char *path)
int ret;
/* "zcat /sysroot/<path> | cpio --quiet -it", but path must be quoted. */
- if (asprintf_nowarn (&cmd, "%s %R | %s --quiet -it", str_zcat, path, str_cpio) == -1) {
+ if (asprin...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...1865debf..24a2d9864 100644
--- a/daemon/initrd.c
+++ b/daemon/initrd.c
@@ -31,8 +31,7 @@
#include "daemon.h"
#include "actions.h"
-GUESTFSD_EXT_CMD(str_zcat, zcat);
-GUESTFSD_EXT_CMD(str_cpio, cpio);
+DECLARE_EXTERNAL_COMMANDS ("zcat", "cpio")
char **
do_initrd_list (const char *path)
@@ -46,7 +45,7 @@ do_initrd_list (const char *path)
int ret;
/* "zcat /sysroot/<path> | cpio --quiet -it", but path must be quoted. */
- if (asprintf_nowarn (&cmd, "%s %R | %s --quiet -it", str_zcat, path, str_cpio) == -1) {
+ if (asprintf_...
2017 Jul 27
3
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
This is a simpler patch that removes GUESTFSD_EXT_CMD completely.
2017 Jul 24
6
[PATCH 0/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
Replace GUESTFSD_EXT_CMD with a command line option
‘./guestfsd --print-external-commands’