search for: strcaseeq

Displaying 20 results from an estimated 53 matches for "strcaseeq".

2009 Nov 09
1
use STREQ(a,b), not strcmp(a,b) == 0
The series below makes changes like these mechanically, one class of change per change-set: strcmp(...) == 0 to STREQ(...) strcmp(...) != 0 to STRNEQ(...) strncmp(...) == 0 to STREQLEN(...) strncmp(...) != 0 to STRNEQLEN(...) strcasecmp(...) == 0 to STRCASEEQ(...) strcasecmp(...) != 0 to STRCASENEQ(...) strncasecmp(...) == 0 to STRCASEEQLEN(...) strncasecmp(...) != 0 to STRCASENEQLEN(...) Then it enables the "make syntax-check" tests to ensure no offending (convertable) use is introduced. But there's one twist. In order for t...
2014 Dec 17
3
[PATCH 0/3] Allow environment variables to have boolean values.
https://bugzilla.redhat.com/show_bug.cgi?id=1175196 Currently if you write something like LIBGUESTFS_DEBUG=0 or LIBGUESTFS_DEBUG=true then it doesn't do what you probably expect. This patch series fixes that. Rich.
2012 Sep 03
1
[PATCH] daemon: provide list of checksum commands
...sum); +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"; + return str_sha1sum;...
2010 Jun 01
1
[PATCH] fish: help command return error for non-existent commands (RHBZ#597145).
...list_commands (); - exit (EXIT_SUCCESS); + + exit (r == 0 ? EXIT_SUCCESS : EXIT_FAILURE); + } case 'i': inspector = 1; @@ -957,11 +961,11 @@ issue_command (const char *cmd, char *argv[], const char *pipecmd) /* Otherwise execute it locally. */ else if (STRCASEEQ (cmd, "help")) { - if (argc == 0) + if (argc == 0) { list_commands (); - else - display_command (argv[0]); - r = 0; + r = 0; + } else + r = display_command (argv[0]); } else if (STRCASEEQ (cmd, "quit") || STRCASEEQ (cmd, &qu...
2015 Nov 13
1
[PATCH v2] inspection: Fix detection of the kernel version of Windows ≥ 10 (RHBZ#1281578).
This fixes v1 by checking the correct length field. I have tested this against Windows 10 and it works. Rich.
2015 Nov 13
2
[PATCH] inspection: Fix detection of the kernel version of Windows ≥ 10 (RHBZ#1281578).
I wasn't able to test this patch yet, so I'm just going off the description in the bug and in an MSDN posting. Rich.
2017 Aug 09
0
[PATCH v12 04/11] New API: Deprecate hivex_value_utf8 and replace with hivex_value_string.
...on ? : "", diff --git a/lib/inspect-fs-windows.c b/lib/inspect-fs-windows.c index 34f33c908..9d31c1e6b 100644 --- a/lib/inspect-fs-windows.c +++ b/lib/inspect-fs-windows.c @@ -355,7 +355,7 @@ check_windows_software_registry (guestfs_h *g, struct inspect_fs *fs) goto out; if (STRCASEEQ (key, "ProductName")) { - fs->product_name = guestfs_hivex_value_utf8 (g, value); + fs->product_name = guestfs_hivex_value_string (g, value); if (!fs->product_name) goto out; } @@ -396,7 +396,7 @@ check_windows_software_registry (guestfs_h *g, struc...
2010 Feb 05
13
[PATCH 01/14] hivexsh: Document some peculiarities of the "cd" command.
--- hivex/hivexsh.pod | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/hivex/hivexsh.pod b/hivex/hivexsh.pod index 277e3ae..9336798 100644 --- a/hivex/hivexsh.pod +++ b/hivex/hivexsh.pod @@ -100,7 +100,14 @@ or even: Path elements (node names) are matched case insensitively, and characters like space, C<*>, and C<?> have I<no> special
2016 Feb 05
3
[PATCH] inspect: get windows drive letters for GPT disks.
...= guestfs_part_get_gpt_guid (g, device, partnum); + + if (fs_guid == NULL) + continue; + + /* extract the GUID from the Windows registry blob */ + blob_guid = extract_guid_from_registry_blob (g, blob); + + /* if both GUIDs match, we have found mapping for out device */ + if (STRCASEEQ (fs_guid, blob_guid)) + return safe_strdup (g, fs_dev); + } + + return NULL; +} + +/* Extracts the binary GUID stored in blob from Windows registry + * HKLM\SYSTYEM\MountedDevices\DosDevices value and converts it to a GUID string + * so that it can be matched against libguestfs partition...
2016 Feb 05
2
[PATCHv2] inspect: get windows drive letters for GPT disks.
...uid = guestfs_part_get_gpt_guid (g, device, partnum); + + if (fs_guid == NULL) + continue; + + /* extract the GUID from the Windows registry blob */ + blob_guid = extract_guid_from_registry_blob (g, blob); + + /* if both GUIDs match, we have found mapping for out device */ + if (STRCASEEQ (fs_guid, blob_guid)) + return safe_strdup (g, parts[i]); + } + + return NULL; +} + +/* Extracts the binary GUID stored in blob from Windows registry + * HKLM\SYSTYEM\MountedDevices\DosDevices value and converts it to a + * GUID string so that it can be matched against libguestfs partition...
2019 Jul 09
7
[PATCH 0/5] Split virt-p2v in own repository
Hi, as it was already discussed on this list, here it is my attempt in splitting virt-p2v in an own repository. Sadly there are things that must be copied from libguestfs, as it cannot be avoided. The approach taken was to run a script (will send separately) to just get the "p2v" subdirectory with its history as own repository, and then add in few followup commits all the bits needed
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
2013 Jan 25
4
[PATCH 0/3] Use __attribute__((cleanup(...)))
This patch series changes a small part of the library to use __attribute__((cleanup(...))) to automatically free memory when pointers go out of the current scope. In general terms this seems to be a small win although you do have to use it carefully. For functions where you can completely get rid of the "exit code paths", it can simplify things. For a good example, see the
2016 Feb 05
0
Re: [PATCH] inspect: get windows drive letters for GPT disks.
...um); > + > + if (fs_guid == NULL) > + continue; > + > + /* extract the GUID from the Windows registry blob */ > + blob_guid = extract_guid_from_registry_blob (g, blob); > + > + /* if both GUIDs match, we have found mapping for out device */ > + if (STRCASEEQ (fs_guid, blob_guid)) > + return safe_strdup (g, fs_dev); > + } > + > + return NULL; > +} > + > +/* Extracts the binary GUID stored in blob from Windows registry > + * HKLM\SYSTYEM\MountedDevices\DosDevices value and converts it to a GUID string > + * so that it...
2016 Feb 06
1
[PATCH v3] inspect: get windows drive letters for GPT disks.
...pe, "gpt")) + continue; + + /* get the GPT parition GUID from the partition block device */ + fs_guid = guestfs_part_get_gpt_guid (g, device, partnum); + if (fs_guid == NULL) + continue; + + /* if both GUIDs match, we have found the mapping for our device */ + if (STRCASEEQ (fs_guid, blob_guid)) + return safe_strdup (g, parts[i]); + } + + return NULL; +} + +/* Extracts the binary GUID stored in blob from Windows registry + * HKLM\SYSTYEM\MountedDevices\DosDevices value and converts it to a + * GUID string so that it can be matched against libguestfs partition +...
2010 Jul 07
1
[PATCH] hivex: add hivex_set_value api call and ocaml/perl bindings, tests
...if (valval == NULL) goto leave_partial; + + ++alloc_ct; + value->value = valval; + value->t = t; + value->len = len; + + char *valkey = hivex_value_key (h, *prev_val); + if (valkey == NULL) goto leave_partial; + + ++alloc_ct; + value->key = valkey; + + if (STRCASEEQ (valkey, val->key)) + idx_of_val = prev_val - prev_values; + } + + if (idx_of_val > -1) { + free (values[idx_of_val].key); + free (values[idx_of_val].value); + } else { + idx_of_val = nr_values; + ++nr_values; + } + + hive_set_value *value = &values[idx_of_val]; + *...
2012 Jan 24
14
[PATCH 00/14] Run the daemon under valgrind and fix resultant errors.
This patch series lets you run the daemon under valgrind. Many errors were found and fixed. With the complete series applied, valgrind doesn't show any errors.
2011 Sep 03
1
Patch to build hivex lib on Windows
Hi I'm just posting this here in case someone is interested in building hivex on Windows (mingw32). The attached patch allows building the lib but not the tools (hivexsh etc..) as there are some more problems to solve. In short terms, this patch replaces file i/o functions and mmap(), munmap() with their win32api pendants. cu -- Unix _IS_ user friendly - it's just selective about
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...sum); -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; + return "sha1sum";...
2016 Feb 05
1
Re: [PATCH] inspect: get windows drive letters for GPT disks.
...) > > +      continue; > > + > > +    /* extract the GUID from the Windows registry blob */ > > +    blob_guid = extract_guid_from_registry_blob (g, blob); > > + > > +    /* if both GUIDs match, we have found mapping for out device > > */ > > +    if (STRCASEEQ (fs_guid, blob_guid)) > > +        return safe_strdup (g, fs_dev); > > +  } > > + > > +  return NULL; > > +} > > + > > +/* Extracts the binary GUID stored in blob from Windows registry  > > + * HKLM\SYSTYEM\MountedDevices\DosDevices value and converts...