similar to: use STREQ(a,b), not strcmp(a,b) == 0

Displaying 20 results from an estimated 4000 matches similar to: "use STREQ(a,b), not strcmp(a,b) == 0"

2014 Aug 07
4
[PATCH 0/2] Fix errors found by Clang static analyzer
Hi, Here is one trivial initialization fix and another patch to convert a huge macro to an inline function. The result of the expansion would show up in an assertion which triggered a -Woverlength-strings warning. Peter Wu (2): Fix garbage return value on error Fix overly long assertion string lib/hivex-internal.h | 28 ++++++++++++++++------------ lib/node.c | 18
2012 Sep 03
1
[PATCH] daemon: provide list of checksum commands
While adding the list of external commands I missed the various checksum tools. Signed-off-by: Olaf Hering <olaf at aepfle.de> --- WARNING: not compile tested ... diff --git a/daemon/checksum.c b/daemon/checksum.c index f2e040d..f16a7c0 100644 --- a/daemon/checksum.c +++ b/daemon/checksum.c @@ -31,24 +31,31 @@ GUESTFSD_EXT_CMD(str_find, find); GUESTFSD_EXT_CMD(str_xargs, xargs);
2014 Nov 26
5
[PATCH] tools: implement --short-options
Just like --long-options, it makes it possible to know which short options are supported by each tool; this can help improving the bash completion, for example. --- align/scan.c | 3 +++ builder/cmdline.ml | 1 + cat/cat.c | 3 +++ cat/filesystems.c | 3 +++ cat/log.c | 3 +++ cat/ls.c | 3 +++
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
GUESTFSD_EXT_CMD is used by OpenSUSE to track which external commands are run by the daemon and package those commands into the appliance. However because this uses linker trickery it won't work from OCaml code. Replace it with a [nearly] standard C mechanism. Files still have to declare the external commands they will use, eg: DECLARE_EXTERNAL_COMMANDS ("btrfs",
2017 Feb 14
0
[PATCH 2/2] GCC 7: Allocate sufficient space for sprintf output.
GCC 7.0.1 can determine if there is likely to be sufficient space in the output buffer when using sprintf/snprintf, based on the format string. The errors were all either of this form: bindtests.c:717:29: error: '%zu' directive output may be truncated writing between 1 and 19 bytes into a region of size 16 [-Werror=format-truncation=] snprintf (strs[i], 16, "%zu", i);
2017 Feb 14
0
[PATCH v2 2/2] GCC 7: Allocate sufficient space for sprintf output.
GCC 7.0.1 can determine if there is likely to be sufficient space in the output buffer when using sprintf/snprintf, based on the format string. The errors were all either of this form: bindtests.c:717:29: error: '%zu' directive output may be truncated writing between 1 and 19 bytes into a region of size 16 [-Werror=format-truncation=] snprintf (strs[i], 16, "%zu", i);
2013 Mar 12
1
[PATCH] launch: appliance: Add custom parameters last.
From: "Richard W.M. Jones" <rjones at redhat.com> This allows custom parameters to modify parameters added by libguestfs, eg. by doing: -set drive.hd0.file=rbd:foo/bar Thanks: infernix @ #libguestfs --- src/launch-appliance.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/launch-appliance.c b/src/launch-appliance.c
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
Because of previous automated commits, such as changing 'guestfs___' -> 'guestfs_int_', several function calls no longer lined up with their parameters, and some lines were too long. The bulk of this commit was done using emacs batch mode and the technique described here: http://www.cslab.pepperdine.edu/warford/BatchIndentationEmacs.html The changes suggested by emacs were
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
GUESTFSD_EXT_CMD was used by OpenSUSE to track which external commands are run by the daemon and package those commands into the appliance. It is no longer used by recent SUSE builds, so remove it. Thanks: Pino Toscano, Olaf Hering. --- daemon/9p.c | 3 +- daemon/available.c | 7 +-- daemon/base64.c | 6 +-- daemon/blkid.c | 10 ++---
2017 Aug 03
0
[PATCH 3/6] daemon: Refine check for Device and Dev_or_Path parameters (RHBZ#1477623).
For Device parameters we expect a block device name. However we were only testing for "/dev/..." and so chardevs (from the appliance) could be passed here, resulting in strange effects. This adds a function is_device_parameter which tests for a valid block device name. For Dev_or_Path parameters much the same, except we can also use the is_device_parameter function elsewhere in the
2015 Jul 17
1
[PATCH] daemon: add a space after func/macro to fit code-style
more daemon codes covered Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- daemon/debug.c | 2 +- daemon/devsparts.c | 2 +- daemon/guestfsd.c | 6 +++--- daemon/labels.c | 4 ++-- daemon/ldm.c | 16 ++++++++-------- daemon/md.c | 10 +++++----- daemon/mkfs.c | 2 +- daemon/parted.c | 8 ++++---- daemon/statvfs.c | 8 ++++---- daemon/sync.c
2015 Jul 13
1
[PATCH] daemon: add a space after func name to fit code-style
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- daemon/blkid.c | 2 +- daemon/btrfs.c | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/daemon/blkid.c b/daemon/blkid.c index 1ac42b4..74d2fa6 100644 --- a/daemon/blkid.c +++ b/daemon/blkid.c @@ -199,7 +199,7 @@ error: } static char ** -blkid_without_p_i_opt(const char
2020 Feb 13
0
[PATCH v3 1/1] tools: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com> This patch adds '--blocksize' command line option for guestfish and other C-based tools. This option allows specifying disk sector size. --- align/Makefile.am | 1 + align/scan.c | 8 ++++++++ align/virt-alignment-scan.pod | 2 ++ cat/Makefile.am | 1 + cat/cat.c | 8 ++++++++
2020 Feb 12
0
[PATCH v2 1/1] tools: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com> This patch adds '--blocksize' command line option for guestfish and other C-based tools. This option allows specifying disk sector size. --- align/Makefile.am | 1 + align/scan.c | 8 ++++++++ align/virt-alignment-scan.pod | 2 ++ cat/Makefile.am | 1 + cat/cat.c | 8 ++++++++
2020 Feb 11
0
[PATCH 1/1] tools: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com> This patch adds '--blocksize' command line option for guestfish and other C-based tools. This option allows specifying disk sector size. --- align/scan.c | 8 ++++++++ align/virt-alignment-scan.pod | 12 ++++++++++++ cat/cat.c | 8 ++++++++ cat/filesystems.c | 8 ++++++++ cat/log.c
2015 Oct 16
1
[PATCH] inspect: Include more information for augeas parse errors (RHBZ#1229119)
If Augeas fails to parse a file, more information is available in at least these fields: ><fs> aug-ls /augeas/files/etc/fstab/error /augeas/files/etc/fstab/error/char /augeas/files/etc/fstab/error/lens /augeas/files/etc/fstab/error/line /augeas/files/etc/fstab/error/message /augeas/files/etc/fstab/error/pos Pull out some of these fields and add them to the error message. The new error
2016 Feb 05
0
Re: [PATCH] inspect: get windows drive letters for GPT disks.
On Fri, Feb 05, 2016 at 12:15:32PM -0500, Dawid Zamirski wrote: > This patch updates the guestfs_inspect_get_drive_mappings API call to > also return drive letters for GPT paritions. Previously this worked > only for MBR partitions. This is achieved by matching the GPT partition > GUID with the info stored in the blob from > HKLM\SYSTEM\MountedDevices\DosDevices keys. For GPT
2018 Sep 19
0
[PATCH 2/2] Introduce a --key option in tools that accept keys
The majority of the tools have already options (--echo-keys & --keys-from-stdin) to deal with LUKS credentials, although there is no way to automatically provide credentials. --keys-from-stdin is suboptimal, because it is an usable solution only when there is just one device to open, and no other input passed via stdin to the tool (like the commands for guestfish). To overcome this
2015 Jan 06
0
[PATCH] virt-diff: add additional ignore options
--compare-xattrs --compare-extra-stats --compare-perms --compare-uids --compare-times to ignore, when set to no, specified files informations when comparing. The current strategy to disable comparison on file informations is to flatten data structure so they return the same 0/NULL value on comparison and be, in fact, ignored to determine if the files differ. This patch preserve original
2016 Feb 06
1
[PATCH v3] inspect: get windows drive letters for GPT disks.
This patch updates the guestfs_inspect_get_drive_mappings API call to also return drive letters for GPT paritions. Previously this worked only for MBR partitions. This is achieved by matching the GPT partition GUID with the info stored in the blob from HKLM\SYSTEM\MountedDevices\DosDevices keys. For GPT partions this blob contains a "DMIO:ID:" prefix followed by a 16 byte binary GUID.