search for: csumtyp

Displaying 20 results from an estimated 26 matches for "csumtyp".

Did you mean: csumtype
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
..._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 "sha1sum"; +...
2009 Nov 09
1
use STREQ(a,b), not strcmp(a,b) == 0
...2 +- hivex/hivex.c | 4 +- src/generator.ml | 12 ++++---- 8 files changed, 54 insertions(+), 54 deletions(-) diff --git a/daemon/checksum.c b/daemon/checksum.c index 2423265..499d19d 100644 --- a/daemon/checksum.c +++ b/daemon/checksum.c @@ -36,19 +36,19 @@ do_checksum (const char *csumtype, const char *path) int r; int len; - if (strcasecmp (csumtype, "crc") == 0) + if (STRCASEEQ (csumtype, "crc")) program = "cksum"; - else if (strcasecmp (csumtype, "md5") == 0) + else if (STRCASEEQ (csumtype, "md5")) program = &...
2015 May 28
0
Re: Concurrent scanning of same disk
...300, NoxDaFox wrote: > 2015-05-27 15:21 GMT+03:00 Richard W.M. Jones <rjones@redhat.com>: > > > On Wed, May 27, 2015 at 09:38:38AM +0300, NoxDaFox wrote: > > > * RuntimeError: file receive cancelled by daemon - On r = > > > libguestfsmod.checksums_out (self._o, csumtype, directory, sumsfile) > > > * RuntimeError: hivex_close: do_hivex_close: you must call 'hivex-open' > > > first to initialize the hivex handle - On r = libguestfsmod.inspect_os > > > (self._o) > > > > This error is likely to be -EIO (it's actuall...
2012 Jan 16
1
[PATCH] generator: Add an explicit Cancellable flag
..."], []), 243, + [Cancellable], [], "download file and encode as base64", "\ This command downloads the contents of C<filename>, writing it out to local file C<base64file> encoded as base64."); - ("checksums_out", (RErr, [String "csumtype"; Pathname "directory"; FileOut "sumsfile"], []), 244, [], + ("checksums_out", (RErr, [String "csumtype"; Pathname "directory"; FileOut "sumsfile"], []), 244, + [Cancellable], [], "compute MD5, SHAx or CRC checksum of...
2015 May 28
2
Re: Concurrent scanning of same disk
...; > 2015-05-27 15:21 GMT+03:00 Richard W.M. Jones <rjones@redhat.com>: > > > > > On Wed, May 27, 2015 at 09:38:38AM +0300, NoxDaFox wrote: > > > > * RuntimeError: file receive cancelled by daemon - On r = > > > > libguestfsmod.checksums_out (self._o, csumtype, directory, sumsfile) > > > > * RuntimeError: hivex_close: do_hivex_close: you must call > 'hivex-open' > > > > first to initialize the hivex handle - On r = > libguestfsmod.inspect_os > > > > (self._o) > > > > > > This error is...
2015 May 27
0
Re: Concurrent scanning of same disk
On Wed, May 27, 2015 at 09:38:38AM +0300, NoxDaFox wrote: > * RuntimeError: file receive cancelled by daemon - On r = > libguestfsmod.checksums_out (self._o, csumtype, directory, sumsfile) > * RuntimeError: hivex_close: do_hivex_close: you must call 'hivex-open' > first to initialize the hivex handle - On r = libguestfsmod.inspect_os > (self._o) This error is likely to be -EIO (it's actually a bug in libguestfs that it doesn't report...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
..._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 str_sha1sum; + retur...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-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 str_sha1sum; + retur...
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.
...diagnostic pop +#endif + int do_btrfs_replace (const char *srcdev, const char *targetdev, const char* mntpoint) diff --git a/daemon/checksum.c b/daemon/checksum.c index eec45e2..3045948 100644 --- a/daemon/checksum.c +++ b/daemon/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);...
2012 Jan 12
1
Libguestfs gobject bindings
I'm currently working on gobject bindings for libguestfs. I haven't got as far as compiling anything yet, but I've attached the C header for initial review. Matt -- Matthew Booth, RHCA, RHCSS Red Hat Engineering, Virtualisation Team GPG ID: D33C3490 GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490 -------------- next part -------------- An embedded and
2017 Jul 27
3
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
This is a simpler patch that removes GUESTFSD_EXT_CMD completely.
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 May 04
4
[PATCH 0/3] generator: Allow returned strings to be annotated as devices.
If we want to permit more than 255 drives to be added, then we will have to add the disks to the same virtio-scsi target using different unit (LUN) numbers. Unfortunately SCSI LUN enumeration in the Linux is not deterministic (eg. two disks with target=0, lun=[0,1] can be enumerated as /dev/sda or /dev/sdb randomly). Dealing with that will require some very complex device name translation on the
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’
2015 May 27
3
Concurrent scanning of same disk
...ages and in each process I create an guestfs instance and mount one of the disks. The operation seems successful as I'm gathering the data I am looking for but I suffer from these random failures: * RuntimeError: file receive cancelled by daemon - On r = libguestfsmod.checksums_out (self._o, csumtype, directory, sumsfile) * RuntimeError: hivex_close: do_hivex_close: you must call 'hivex-open' first to initialize the hivex handle - On r = libguestfsmod.inspect_os (self._o) The random nature of the errors make me think about some concurrency problem. The disk images are mounted read on...
2015 May 28
3
Re: Concurrent scanning of same disk
2015-05-27 15:21 GMT+03:00 Richard W.M. Jones <rjones@redhat.com>: > On Wed, May 27, 2015 at 09:38:38AM +0300, NoxDaFox wrote: > > * RuntimeError: file receive cancelled by daemon - On r = > > libguestfsmod.checksums_out (self._o, csumtype, directory, sumsfile) > > * RuntimeError: hivex_close: do_hivex_close: you must call 'hivex-open' > > first to initialize the hivex handle - On r = libguestfsmod.inspect_os > > (self._o) > > This error is likely to be -EIO (it's actually a bug in libguestfs &gt...
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.
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
...ncellable = true; tests = [ InitScratchFS, Always, TestResultString ( @@ -2752,7 +2752,7 @@ See also C<guestfs_upload>, C<guestfs_cat>." }; { defaults with name = "checksum"; added = (1, 0, 2); - style = RString "checksum", [String "csumtype"; Pathname "path"], []; + style = RString "checksum", [String (PlainString, "csumtype"); String (Pathname, "path")], []; tests = [ InitISOFS, Always, TestResultString ( [["checksum"; "crc"; "/known-3&quot...