search for: program_of_csum

Displaying 11 results from an estimated 11 matches for "program_of_csum".

2014 Aug 08
3
[PATCH] daemon: add CLEANUP_CLOSE
Just call close on the specified fd, if valid. --- daemon/daemon.h | 3 +++ daemon/guestfsd.c | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/daemon/daemon.h b/daemon/daemon.h index fb74e91..0caad45 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -173,6 +173,7 @@ asprintf_nowarn (char **strp, const char *fmt, ...) extern void cleanup_free (void *ptr); extern void
2012 Sep 03
1
[PATCH] daemon: provide list of checksum commands
..._cksum, cksum); +GUESTFSD_EXT_CMD(str_md5sum, md5sum); +GUESTFSD_EXT_CMD(str_sha1sum, sha1sum); +GUESTFSD_EXT_CMD(str_sha224sum, sha224sum); +GUESTFSD_EXT_CMD(str_sha256sum, sha256sum); +GUESTFSD_EXT_CMD(str_sha384sum, sha384sum); +GUESTFSD_EXT_CMD(str_sha512sum, sha512sum); static const char * program_of_csum (const char *csumtype) { if (STRCASEEQ (csumtype, "crc")) - return "cksum"; + return str_cksum; else if (STRCASEEQ (csumtype, "md5")) - return "md5sum"; + return str_md5sum; else if (STRCASEEQ (csumtype, "sha1")) - return &q...
2016 Mar 06
8
[PATCH 0/5] Use less stack.
Various changes/fixes to use smaller stack frames. Rich.
2016 Mar 07
2
[PATCH v2] Use less stack.
...checksum.c @@ -132,12 +132,23 @@ do_checksums_out (const char *csumtype, const char *dir) { struct stat statbuf; int r; + const char *program; + CLEANUP_FREE char *str = NULL; + CLEANUP_FREE char *sysrootdir = NULL; + CLEANUP_FREE char *cmd = NULL; + FILE *fp; - const char *program = program_of_csum (csumtype); + str = malloc (GUESTFS_MAX_CHUNK_SIZE); + if (str == NULL) { + reply_with_perror ("malloc"); + return -1; + } + + program = program_of_csum (csumtype); if (program == NULL) return -1; - CLEANUP_FREE char *sysrootdir = sysroot_path (dir); + sysrootdir = s...
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
...it a/daemon/checksum.c b/daemon/checksum.c index 2cc4a2b..f2e040d 100644 --- a/daemon/checksum.c +++ b/daemon/checksum.c @@ -29,6 +29,9 @@ #include "daemon.h" #include "actions.h" +GUESTFSD_EXT_CMD(str_find, find); +GUESTFSD_EXT_CMD(str_xargs, xargs); + static const char * program_of_csum (const char *csumtype) { @@ -150,7 +153,8 @@ do_checksums_out (const char *csumtype, const char *dir) } char *cmd; - if (asprintf_nowarn (&cmd, "cd %Q && find -type f -print0 | xargs -0 %s", + if (asprintf_nowarn (&cmd, "cd %Q && %s -type f -print0...
2012 Aug 30
1
[PATCH] collect list of called external commands
...-git a/daemon/checksum.c b/daemon/checksum.c index 2cc4a2b..8d6cbdb 100644 --- a/daemon/checksum.c +++ b/daemon/checksum.c @@ -29,6 +29,9 @@ #include "daemon.h" #include "actions.h" +GUESTFS_EXT_CMD(str_find, find); +GUESTFS_EXT_CMD(str_xargs, xargs); + static const char * program_of_csum (const char *csumtype) { @@ -150,7 +153,8 @@ do_checksums_out (const char *csumtype, const char *dir) } char *cmd; - if (asprintf_nowarn (&cmd, "cd %Q && find -type f -print0 | xargs -0 %s", + if (asprintf_nowarn (&cmd, "cd %Q && %s -type f -print0...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
..._cksum, cksum); -GUESTFSD_EXT_CMD(str_md5sum, md5sum); -GUESTFSD_EXT_CMD(str_sha1sum, sha1sum); -GUESTFSD_EXT_CMD(str_sha224sum, sha224sum); -GUESTFSD_EXT_CMD(str_sha256sum, sha256sum); -GUESTFSD_EXT_CMD(str_sha384sum, sha384sum); -GUESTFSD_EXT_CMD(str_sha512sum, sha512sum); - static const char * program_of_csum (const char *csumtype) { if (STRCASEEQ (csumtype, "crc")) - return str_cksum; + return "cksum"; else if (STRCASEEQ (csumtype, "md5")) - return str_md5sum; + return "md5sum"; else if (STRCASEEQ (csumtype, "sha1")) - return st...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...); +DECLARE_EXTERNAL_COMMANDS ("find", "xargs", "cksum", "md5sum", + "sha1sum", "sha224sum", "sha256sum", "sha384sum", + "sha512sum") static const char * program_of_csum (const char *csumtype) { if (STRCASEEQ (csumtype, "crc")) - return str_cksum; + return "cksum"; else if (STRCASEEQ (csumtype, "md5")) - return str_md5sum; + return "md5sum"; else if (STRCASEEQ (csumtype, "sha1")) - return st...
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’