Displaying 20 results from an estimated 76 matches for "pcre_free".
2014 Nov 28
2
[PATCH] lib: Add COMPILE_REGEXP macro to hide regexp constructors/destructors.
...\
+ static void \
+ free_regexp_##name (void) \
+ { \
+ pcre_free (name); \
+ }
+
/* stringsbuf.c */
struct stringsbuf {
char **argv;
diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c
index fb5cc1a..01a59f1 100644
--- a/src/inspect-fs-unix.c
+++ b/src/inspect-fs-unix.c
@@ -45,135 +45,41 @@
#include...
2016 Jun 23
1
[PATCH] p2v: improve error message for sudo with password
...", 0);
COMPILE (ssh_message_re, "(ssh: .*)", 0);
+ COMPILE (sudo_password_re, "sudo: a password is required", 0);
/* The magic synchronization strings all match this expression. See
* start_ssh function below.
*/
@@ -160,6 +162,7 @@ free_regexps (void)
{
pcre_free (password_re);
pcre_free (ssh_message_re);
+ pcre_free (sudo_password_re);
pcre_free (prompt_re);
pcre_free (version_re);
pcre_free (feature_libguestfs_rewrite_re);
@@ -532,6 +535,7 @@ test_connection (struct config *config)
(mexp_regexp[]) {...
2011 Nov 24
2
[PATCH] NFC: Cleanup iteration over fstab entries in inspect_fs_unix.c
...t;, 0);
- COMPILE (re_aug_seq, "/\\d+$", 0);
COMPILE (re_xdev, "^/dev/(h|s|v|xv)d([a-z]+)(\\d*)$", 0);
COMPILE (re_cciss, "^/dev/(cciss/c\\d+d\\d+)(?:p(\\d+))?$", 0);
COMPILE (re_mdN, "^(/dev/md\\d+)$", 0);
@@ -132,7 +131,6 @@ free_regexps (void)
pcre_free (re_scientific_linux);
pcre_free (re_scientific_linux_no_minor);
pcre_free (re_major_minor);
- pcre_free (re_aug_seq);
pcre_free (re_xdev);
pcre_free (re_cciss);
pcre_free (re_mdN);
@@ -725,47 +723,43 @@ check_fstab (guestfs_h *g, struct inspect_fs *fs)
Hash_table *md_map;
if...
2015 Nov 28
0
[patch] Use JIT for PCRE pattern matching
...pcre_study(re_pcre, 0, &errorptr);
+ re_pe = pcre_study(re_pcre, PCRE_STUDY_JIT_COMPILE, &errorptr);
if (errorptr)
warning(_("PCRE pattern study error\n\t'%s'\n"), errorptr);
@@ -482,7 +486,11 @@
}
vmaxset(vmax2);
}
+#ifdef PCRE_CONFIG_JIT
+ pcre_free_study(re_pe);
+#else
pcre_free(re_pe);
+#endif
pcre_free(re_pcre);
} else if (!useBytes && use_UTF8) { /* ERE in wchar_t */
regex_t reg;
@@ -867,12 +875,12 @@
warning(_("PCRE pattern compilation error\n\t'%s'\n\tat '%s'\n"),
errorptr, spa...
2002 Nov 02
5
problem compiling R-1.6.1 on WinNT: pcre
...a
../extra/bzip2/libbz2.a dllversion.o -L. -lg2c -lRblas -lcomctl32 -lversion
libmain.a(pcre.o)(.text+0x108):pcre.c: undefined reference to `pcre_compile'
libmain.a(pcre.o)(.text+0x16e):pcre.c: undefined reference to `pcre_exec'
libmain.a(pcre.o)(.text+0x19d):pcre.c: undefined reference to `pcre_free'
libmain.a(pcre.o)(.text+0x499):pcre.c: undefined reference to `pcre_compile'
libmain.a(pcre.o)(.text+0x4bb):pcre.c: undefined reference to `pcre_info'
libmain.a(pcre.o)(.text+0x587):pcre.c: undefined reference to `pcre_exec'
libmain.a(pcre.o)(.text+0x603):pcre.c: undefined referenc...
2014 Sep 23
1
[PATCH] inspect: map Hurd devices, and enable fstab introspection
...quot;^VERSION = (\\d+)", 0);
COMPILE (re_sles_patchlevel, "^PATCHLEVEL = (\\d+)", 0);
COMPILE (re_minix, "^(\\d+)\\.(\\d+)(\\.(\\d+))?", 0);
+ COMPILE (re_hurd_dev, "^/dev/(h)d(\\d+)s(\\d+)$", 0);
}
static void
@@ -170,6 +172,7 @@ free_regexps (void)
pcre_free (re_sles_version);
pcre_free (re_sles_patchlevel);
pcre_free (re_minix);
+ pcre_free (re_hurd_dev);
}
static void check_architecture (guestfs_h *g, struct inspect_fs *fs);
@@ -776,7 +779,11 @@ guestfs___check_hurd_root (guestfs_h *g, struct inspect_fs *fs)
/* Determine the architectur...
2013 Nov 05
2
[PATCH stable-1.24] Fix fstab block device resolution for FreeBSD
.../(ada{0,1}|vtbd)(\\d+)p(\\d+)$", 0);
COMPILE (re_diskbyid, "^/dev/disk/by-id/.*-part(\\d+)$", 0);
COMPILE (re_netbsd, "^NetBSD (\\d+)\\.(\\d+)", 0);
COMPILE (re_opensuse, "^(openSUSE|SuSE Linux|SUSE LINUX) ", 0);
@@ -143,7 +145,8 @@ free_regexps (void)
pcre_free (re_xdev);
pcre_free (re_cciss);
pcre_free (re_mdN);
- pcre_free (re_freebsd);
+ pcre_free (re_freebsd_mbr);
+ pcre_free (re_freebsd_gpt);
pcre_free (re_diskbyid);
pcre_free (re_netbsd);
pcre_free (re_opensuse);
@@ -1464,7 +1467,22 @@ resolve_fstab_device (guestfs_h *g, const char...
2013 Nov 03
2
[PATCH stable-1.24] Fix fstab block device resolution for FreeBSD
.../(ada{0,1}|vtbd)(\\d+)p(\\d+)$", 0);
COMPILE (re_diskbyid, "^/dev/disk/by-id/.*-part(\\d+)$", 0);
COMPILE (re_netbsd, "^NetBSD (\\d+)\\.(\\d+)", 0);
COMPILE (re_opensuse, "^(openSUSE|SuSE Linux|SUSE LINUX) ", 0);
@@ -143,7 +145,8 @@ free_regexps (void)
pcre_free (re_xdev);
pcre_free (re_cciss);
pcre_free (re_mdN);
- pcre_free (re_freebsd);
+ pcre_free (re_freebsd_mbr);
+ pcre_free (re_freebsd_gpt);
pcre_free (re_diskbyid);
pcre_free (re_netbsd);
pcre_free (re_opensuse);
@@ -1464,13 +1467,30 @@ resolve_fstab_device (guestfs_h *g, const cha...
2012 Sep 21
1
[PATCH] Update SuSE Linux detection.
...Linux Desktop ", 0);
+ COMPILE (re_opensuse_version, "^VERSION = (\\d+)\\.(\\d+)", 0);
+ COMPILE (re_sles_version, "^VERSION = (\\d+)", 0);
+ COMPILE (re_sles_patchlevel, "^PATCHLEVEL = (\\d+)", 0);
}
static void
@@ -134,6 +146,12 @@ free_regexps (void)
pcre_free (re_freebsd);
pcre_free (re_diskbyid);
pcre_free (re_netbsd);
+ pcre_free (re_opensuse);
+ pcre_free (re_sles);
+ pcre_free (re_nld);
+ pcre_free (re_opensuse_version);
+ pcre_free (re_sles_version);
+ pcre_free (re_sles_patchlevel);
}
static void check_architecture (guestfs_h *g, s...
2016 Feb 23
3
[PATCH 1/2] lib: Allow the COMPILE_REGEXP macro to be used everywhere.
...\
+ static void \
+ free_regexp_##name (void) \
+ { \
+ pcre_free (name); \
+ }
+
/* The type field of a parsed mountable.
*
* This is used both by mountable_t in the daemon, and
diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h
index 22b6c6c..3707c1b 100644
--- a/src/guestfs-internal.h
+++ b/src/...
2014 Sep 22
1
[PATCH] inspect: basic Minix support
...VERSION = (\\d+)\\.(\\d+)", 0);
COMPILE (re_sles_version, "^VERSION = (\\d+)", 0);
COMPILE (re_sles_patchlevel, "^PATCHLEVEL = (\\d+)", 0);
+ COMPILE (re_minix, "^(\\d+)\\.(\\d+)(\\.(\\d+))?", 0);
}
static void
@@ -167,6 +169,7 @@ free_regexps (void)
pcre_free (re_opensuse_version);
pcre_free (re_sles_version);
pcre_free (re_sles_patchlevel);
+ pcre_free (re_minix);
}
static void check_architecture (guestfs_h *g, struct inspect_fs *fs);
@@ -782,6 +785,48 @@ guestfs___check_hurd_root (guestfs_h *g, struct inspect_fs *fs)
return 0;
}
+/* T...
2015 Jun 17
0
[PATCH v4 2/3] do_btrfs_subvolume_list: fix a bad return value
...memmove (line, line + ovector[6], ovector[7] - ovector[6] + 1);
- this->btrfssubvolume_path = line;
+ this->btrfssubvolume_path =
+ strndup (line + ovector[6], ovector[7] - ovector[6]);
+ if (this->btrfssubvolume_path == NULL)
+ goto error;
}
- free (lines);
pcre_free (re);
return ret;
error:
- free_stringslen (lines, nr_subvolumes);
- if (ret) free (ret->guestfs_int_btrfssubvolume_list_val);
+ for (i = 0; i < nr_subvolumes; ++i) {
+ struct guestfs_int_btrfssubvolume *this =
+ &ret->guestfs_int_btrfssubvolume_list_val[i];
+ fre...
2002 May 17
1
PCRE in development code?
So PCRE dropped into R-devel recently, I tried just dropping 3.9 (latest
version) into src/extra/pcre and compiling on Win32 but its dying during
the final link (undefined reference to 'pcre_free') is there some special
magic I'm missing or do I get to hunt this one down on my own?
Byron Ellis (bellis@hsph.harvard.edu)
"Oook" - The Librarian
Please finger bellis@hsph.harvard.edu for PGP keys
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-...
2013 Jun 05
0
[PATCH 3/3] inspect: Partial support for non-standard windows system root
...sion, "^(\\d+)\\.(\\d+)", 0);
+ COMPILE (re_boot_ini_os_header, "^\\[operating systems\\]\\s*$", 0);
+ COMPILE (re_boot_ini_os, "^(multi|scsi)\\((\\d+)\\)disk\\((\\d+)\\)rdisk\\((\\d+)\\)partition\\((\\d+)\\)([^=]+)=", 0);
}
static void
free_regexps (void)
{
pcre_free (re_windows_version);
+ pcre_free (re_boot_ini_os_header);
+ pcre_free (re_boot_ini_os);
}
static int check_windows_arch (guestfs_h *g, struct inspect_fs *fs);
@@ -143,6 +149,86 @@ guestfs___get_windows_systemroot (guestfs_h *g)
}
}
+ /* If the fs contains boot.ini, check it for no...
2015 Jun 18
2
[PATCH v5 1/2] do_btrfs_qgroup_show: fix a bad return value
We should not use temporary lines buffer as return value,
for lines buffer will be freed.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
---
v5: modify according to Pino's comments
v4: take advantage of sscanf's '%m'.
v3: fix test case failure
daemon/btrfs.c | 34 ++++++++++++++--------------------
1 file changed, 14 insertions(+), 20 deletions(-)
diff --git
2013 Jan 24
5
[PATCH] btrfs: Fix btrfs_subvolume_list on F18
...0)
+ #undef N_MATCHES
+ {
unexpected_output:
reply_with_error ("unexpected output from 'btrfs subvolume list' command: %s", line);
free_stringslen (lines, nr_subvolumes);
free (ret->guestfs_int_btrfssubvolume_list_val);
free (ret);
+ pcre_free(re);
return NULL;
}
- pos = strstr (line, " path ");
- if (pos == NULL)
- goto unexpected_output;
- pos += 6;
+ #if __WORDSIZE == 64
+ #define STRTOU64 strtoul
+ #else
+ #define STRTOU64 strtoull
+ #endif
+
+ errno = 0;
+ ret->guestf...
2011 Dec 01
2
[PATCH 0/2] handle MD devices in fstab
Only change from previous post is explicitly checking md_map for NULL before
hash_free and lookup.
2011 Nov 25
2
[PATCH 0/2] MD device inspection
These patches are rebased on top of current master. In addition, I've made the
following changes:
* Fixed whitespace error.
* Functions return -1 on error.
* Added a debug message when guest contains md devices, but nothing was parsed
from mdadm.conf.
2011 Dec 02
3
[PATCH 1/3] build: Add more suppressions for valgrind tests
---
extratests/suppressions | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/extratests/suppressions b/extratests/suppressions
index 97d4b78..78ca4ab 100644
--- a/extratests/suppressions
+++ b/extratests/suppressions
@@ -3,19 +3,19 @@
Memcheck:Cond
fun:*
fun:numa_node_size64
- fun:numa_init
+ obj:/usr/lib64/libnuma.so.1
}
{
2015 Jun 17
6
[PATCH v4 0/3] btrfs: use CLEANUP_FREE_STRING_LIST for list free
As Pino's comment, we should take advantage of
macro CLEANUP_FREE_STRING_LIST
v4: remove some redundant strdup
v3: fix test case failure
v2: properly initialize lines
Chen Hanxiao (3):
do_btrfs_qgroup_show: fix a bad return value
do_btrfs_subvolume_list: fix a bad return value
btrfs: use CLEANUP_FREE_STRING_LIST for list free
daemon/btrfs.c | 70