search for: dirlen

Displaying 6 results from an estimated 6 matches for "dirlen".

Did you mean: dir_len
2012 Sep 07
1
[LLVMdev] teaching FileCheck to handle variations in order
On 9/7/2012 12:12 PM, Krzysztof Parzyszek wrote: > On 9/7/2012 7:20 AM, Matthew Curtis wrote: >> >> The attached patch implements one possible solution. It introduces a >> position stack and a couple of directives: >> >> * 'CHECK-PUSH:' pushes the current match position onto the stack. >> * 'CHECK-POP:' pops the top value off of the stack
2016 Mar 07
0
Re: [PATCH v2] Use less stack.
...appliance.c > @@ -396,27 +386,24 @@ find_path (guestfs_h *g, > > /* Returns true iff file is contained in dir. */ > static int > -dir_contains_file (const char *dir, const char *file) > +dir_contains_file (guestfs_h *g, const char *dir, const char *file) > { > - size_t dirlen = strlen (dir); > - size_t filelen = strlen (file); > - size_t len = dirlen + filelen + 2; > - char path[len]; > + CLEANUP_FREE char *path; Missing "= NULL" here. Thanks, -- Pino Toscano
2002 Nov 28
0
problem with smbc_init in libsmbclient
..."Problems getting directory entries: %s\n", strerror(errno)); exit(1); } */ /* Now, process the list of names ... */ /* fprintf(stdout, "Directory listing, size = %u\n", dirc); while (dirc > 0) { dsize = ((struct smbc_dirent *)dirp)->dirlen; fprintf(stdout, "Dir Ent, Type: %u, Name: %s, Comment: %s\n", ((struct smbc_dirent *)dirp)->smbc_type, ((struct smbc_dirent *)dirp)->name, ((struct smbc_dirent *)dirp)->comment); dirp += dsize; (char *)dirc -= dsize; } */ return...
2005 Jan 31
1
[patch] add "--ignore" option
...(size_only) args[ac++] = "--size-only"; diff -ur ../rsync-HEAD-20050125-1221GMT.orig/proto.h ./proto.h --- ../rsync-HEAD-20050125-1221GMT.orig/proto.h Tue Jan 25 12:21:14 2005 +++ ./proto.h Thu Jan 27 16:54:02 2005 @@ -47,7 +47,8 @@ void set_filter_dir(const char *dir, unsigned int dirlen); void *push_local_filters(const char *dir, unsigned int dirlen); void pop_local_filters(void *mem); -int check_filter(struct filter_list_struct *listp, char *name, int name_is_dir); +enum matchtype { M_NOMATCH=0, M_INCLUDE, M_EXCLUDE, M_IGNORE }; +enum matchtype check_filter(struct filter_list_s...
2016 Mar 07
2
[PATCH v2] Use less stack.
...ame, O_WRONLY|O_CREAT|O_NOCTTY|O_CLOEXEC, 0666); diff --git a/daemon/find.c b/daemon/find.c index a603054..b47caa8 100644 --- a/daemon/find.c +++ b/daemon/find.c @@ -61,7 +61,13 @@ do_find0 (const char *dir) CLEANUP_FREE char *cmd = NULL; CLEANUP_FREE char *sysrootdir = NULL; size_t sysrootdirlen; - char str[GUESTFS_MAX_CHUNK_SIZE]; + CLEANUP_FREE char *str = NULL; + + str = malloc (GUESTFS_MAX_CHUNK_SIZE); + if (str == NULL) { + reply_with_perror ("malloc"); + return -1; + } sysrootdir = sysroot_path (dir); if (!sysrootdir) { diff --git a/daemon/findfs.c b/daem...
2016 Mar 06
8
[PATCH 0/5] Use less stack.
Various changes/fixes to use smaller stack frames. Rich.