Displaying 13 results from an estimated 13 matches for "glob_mark".
2016 Feb 04
2
[PATCH v2 1/2] daemon: glob: add optarg to control trailing slash for dirs
...aemon/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 & GUESTFS_GLOB_EXPAND_DIRECTORYSLASH_BITMASK)
+ && !directoryslash) {
+ flags &= ~GLOB_MARK;
+ }
/* glob(3) in glibc never calls chdir, so this seems to be safe: */
CHR...
2016 Feb 03
2
[PATCH 1/2] daemon: glob: do not return directories with trailing slash
Do not pass GLOB_MARK as flag for glob(3) in the daemon implementation
of glob, so names of directories will not have a trailing slash.
This allows users to have filenames that can be used with other tools,
such as rm. Add a new test to check this (based on RHBZ#1293271).
A mild behaviour change is that users of the g...
2014 Nov 14
2
[Bug 2314] New: ls -l a_symlink does not list the link permissions
...Severity: normal
Priority: P5
Component: sftp
Assignee: unassigned-bugs at mindrot.org
Reporter: kirk at dovetail.com
Created attachment 2505
--> https://bugzilla.mindrot.org/attachment.cgi?id=2505&action=edit
don't override lstat in glob2 for GLOB_MARK processing
In 1.139 of sftp.c, which was released in 5.7p1:
- djm at cvs.openbsd.org 2010/09/25 09:30:16
[sftp.c configure.ac openbsd-compat/glob.c openbsd-compat/glob.h]
make use of new glob(3) GLOB_KEEPSTAT extension to save extra
server
rountrips to fetch per-file stat(2) inform...
2016 Feb 03
0
[PATCH 2/3] daemon: glob: add option for not returning dirs with trailing slash
...+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 to be safe: */
CHROOT_IN;
- r = glob (pattern, GLOB_MARK|GLOB_BRACE, NULL, &buf);
+ r = glob (pattern, flags, NULL, &buf);
CHROOT_OUT;
if (r == GLOB_NOMATCH) { /* Return an empty list instead of an error. */
diff --git...
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
2007 Nov 04
5
problem with sftp & huawei switches
hello,
I have the problem with sftp, I can't read files and dirs from huawei
switches. I see:
mm:/home/milon# sftp 10.1.1.30:vrpcfg.cfg .
Connecting to 10.1.1.30...
root at 10.1.1.30's password:
Couldn't stat remote file: Operation unsupported
File "flash:/flash:/vrpcfg.cfg" not found.
Received disconnect from 10.1.1.30: 2: The connection is closed by
SSH Server
Current
2012 May 02
4
[PATCH 0/4] fish: Allow the glob command to expand device patterns (RHBZ#635971).
This patch set fixes a two year old bug in guestfish, namely that the
'glob' command does not expand /dev/* patterns.
https://bugzilla.redhat.com/show_bug.cgi?id=635971
Rich.
2008 Jul 21
2
sftp needs a long time for sending a filelist
Hello all
Im using sftp 1:4.7p1-8ubuntu1.2
in a batchjob
Ive noticed that sftp needs a long time for sending a filelist.
The timespan increases exponential if many files are on the
remoteserver.
for example "ls -la *.txt" needs 10 seconds for 2000 files
but needs 50 seconds for 4000 files.
For 150.000 Files i have to wait 15 minutes for example
but the
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-
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...string.h>
+#include <glob.h>
+#include <assert.h>
+
+#include <caml/alloc.h>
+#include <caml/fail.h>
+#include <caml/memory.h>
+#include <caml/mlvalues.h>
+
+/* NB: These flags must appear in the same order as glob.ml */
+static int flags[] = {
+ GLOB_ERR,
+ GLOB_MARK,
+ GLOB_NOSORT,
+ GLOB_NOCHECK,
+ GLOB_NOESCAPE,
+ GLOB_PERIOD,
+};
+
+value
+supermin_glob (value patternv, value flagsv)
+{
+ CAMLparam2 (patternv, flagsv);
+ CAMLlocal2 (rv, sv);
+ int f = 0, r;
+ size_t i;
+ glob_t g;
+
+ memset (&g, 0, sizeof g);
+
+ /* Convert flags to bitmask....
2010 Aug 12
0
[PATCH, v2]: xl: Implement per-API-call garbage-collection lifetime
...path(ctx, domid, "*", "?");
- if (!pattern) return;
+ pattern = userdata_path(&gc, domid, "*", "?");
+ if (!pattern)
+ goto out;
gl.gl_pathc = 0;
gl.gl_pathv = 0;
gl.gl_offs = 0;
r = glob(pattern, GLOB_ERR|GLOB_NOSORT|GLOB_MARK, 0, &gl);
- if (r == GLOB_NOMATCH) return;
- if (r) XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "glob failed for %s", pattern);
+ if (r == GLOB_NOMATCH)
+ goto out;
+ if (r)
+ XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "glob failed for %s", pattern);
for (i=0; i<...
2015 Jun 14
2
[PATCH] pod: Use F<> for filenames instead of C<>.
...c = "run a command via the shell";
longdesc = "\
This call runs a command from the guest filesystem via the
-guest's C</bin/sh>.
+guest's F</bin/sh>.
This is like C<guestfs_command>, but passes the command to:
@@ -5809,7 +5809,7 @@ with flags C<GLOB_MARK|GLOB_BRACE>.
See that manual page for more details.
Notice that there is no equivalent command for expanding a device
-name (eg. C</dev/sd*>). Use C<guestfs_list_devices>,
+name (eg. F</dev/sd*>). Use C<guestfs_list_devices>,
C<guestfs_list_partitions> etc fu...
2017 Feb 18
8
[PATCH 0/6] generator: Split up generator/actions.ml
Split up the huge generator/actions.ml into several smaller files.
Rich.