Displaying 6 results from an estimated 6 matches for "do_glob_expand".
2016 Feb 03
0
[PATCH 2/3] daemon: glob: add option for not returning dirs with trailing slash
...++++++-----
gobject/Makefile.inc | 2 ++
po/POTFILES | 1 +
4 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/daemon/glob.c b/daemon/glob.c
index 45fb30f..de615ee 100644
--- a/daemon/glob.c
+++ b/daemon/glob.c
@@ -26,14 +26,18 @@
#include "actions.h"
char **
-do_glob_expand (const char *pattern)
+do_glob_expand (const char *pattern, int nodirectoryslash)
{
int r;
glob_t buf = { .gl_pathc = 0, .gl_pathv = NULL, .gl_offs = 0 };
+ int flags = GLOB_BRACE;
+
+ if (!nodirectoryslash)
+ flags |= GLOB_MARK;
/* glob(3) in glibc never calls chdir, so this seems...
2016 Feb 04
2
[PATCH v2 1/2] daemon: glob: add optarg to control trailing slash for dirs
...++++++-----
gobject/Makefile.inc | 2 ++
po/POTFILES | 1 +
4 files changed, 28 insertions(+), 7 deletions(-)
diff --git a/daemon/glob.c b/daemon/glob.c
index 45fb30f..a22fd33 100644
--- a/daemon/glob.c
+++ b/daemon/glob.c
@@ -26,14 +26,21 @@
#include "actions.h"
char **
-do_glob_expand (const char *pattern)
+do_glob_expand (const char *pattern, int directoryslash)
{
int r;
glob_t buf = { .gl_pathc = 0, .gl_pathv = NULL, .gl_offs = 0 };
+ int flags = GLOB_BRACE | GLOB_MARK;
+
+ /* GLOB_MARK is default, unless the user explicitly disabled it. */
+ if ((optargs_bitmask &am...
2016 Feb 03
2
[PATCH 1/2] daemon: glob: do not return directories with trailing slash
...ns/rhbz1293271.sh | 70 ++++++++++++++++++++++++++++++++++++++++
4 files changed, 74 insertions(+), 2 deletions(-)
create mode 100755 tests/regressions/rhbz1293271.sh
diff --git a/daemon/glob.c b/daemon/glob.c
index 45fb30f..0e646bd 100644
--- a/daemon/glob.c
+++ b/daemon/glob.c
@@ -33,7 +33,7 @@ do_glob_expand (const char *pattern)
/* glob(3) in glibc never calls chdir, so this seems to be safe: */
CHROOT_IN;
- r = glob (pattern, GLOB_MARK|GLOB_BRACE, NULL, &buf);
+ r = glob (pattern, GLOB_BRACE, NULL, &buf);
CHROOT_OUT;
if (r == GLOB_NOMATCH) { /* Return an empty list instead o...
2016 Feb 03
6
[PATCH 1/3] sysprep, get-kernel: explicit the Guestfs parameter
Help the OCaml compiler by expliciting Guestfs.guestfs as type for 'g'
in some functions.
---
get-kernel/get_kernel.ml | 2 +-
sysprep/sysprep_operation_abrt_data.ml | 2 +-
sysprep/sysprep_operation_bash_history.ml | 2 +-
sysprep/sysprep_operation_ca_certificates.ml | 2 +-
sysprep/sysprep_operation_crash_data.ml
2011 Jun 09
15
[PATCH 00/13] Fix errors found using Coverity static analyzer.
I ran the Coverity static analyzer[1] on libguestfs, and fixed many
errors as a result.
Coverity found some errors in gnulib, but it doesn't seem to be worth
following those up since the version of gnulib we are using is so old.
There are a couple more errors (possibly 1 false-positive) which I'm
going to send in a separate email.
BTW all the errors found by Coverity were in the daemon
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-