search for: n_matches

Displaying 20 results from an estimated 26 matches for "n_matches".

2013 Jan 24
5
[PATCH] btrfs: Fix btrfs_subvolume_list on F18
...LL; + } + for (i = 0; i < nr_subvolumes; ++i) { /* To avoid allocations, reuse the 'line' buffer to store the * path. Thus we don't need to free 'line', since it will be * freed by the calling (XDR) code. */ char *line = lines[i]; + #define N_MATCHES 3 + int ovector[N_MATCHES * 3]; - if (sscanf (line, "ID %" SCNu64 " top level %" SCNu64 " path ", - &ret->guestfs_int_btrfssubvolume_list_val[i].btrfssubvolume_id, - &ret->guestfs_int_btrfssubvolume_list_val[i].btrfss...
2016 Feb 23
3
[PATCH 1/2] lib: Allow the COMPILE_REGEXP macro to be used everywhere.
Since the daemon links to pcre and use regular expressions, and since the COMPILE_REGEXP macro doesn't depend on any aspects of the library-side code (eg. the guestfs_h handle etc), we can allow the daemon to use the COMPILE_REGEXP macro. Move the macro to "guestfs-internal-all.h" to permit this. --- src/guestfs-internal-all.h | 26 ++++++++++++++++++++++++++ src/guestfs-internal.h
2009 Jul 20
3
S_alloc or Calloc for return value
I am trying to write a C function to create a vector of integers that can be used by the R calling function. I do not know the size of the vector in the R calling function. (Well, actually, I have an upper limit on the size, but that is so large that R cannot allocate it. What I'm doing in the function is to do a sieving procedure, and the result will be small enough to fit into my
2015 Feb 11
0
[PATCH v3 1/2] New API: btrfs_balance_status
From: Hu Tao <hutao@cn.fujitsu.com> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- daemon/btrfs.c | 123 +++++++++++++++++++++++++++++++ generator/actions.ml | 10 +++ generator/structs.ml | 12 +++ gobject/Makefile.inc | 2 +
2015 Feb 13
0
[PATCH v4 1/2] New API: btrfs_balance_status
From: Hu Tao <hutao@cn.fujitsu.com> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- daemon/btrfs.c | 126 +++++++++++++++++++++++++++++++ generator/actions.ml | 10 +++ generator/structs.ml | 12 +++ gobject/Makefile.inc | 2 +
2015 Feb 13
3
[PATCH v4 0/2] add btrfs_balance_status and btrfs_scrub_status
v4: - add reply_with_error when nlines < 1 - remove `i == X' tests. v3: - rebase on upstream - fix some comments v2: - add check for the length of lines[] - the code parsing 'btrfs scrub -R status' output is changed into a loop Hu Tao (2): New API: btrfs_balance_status New API: btfs_scrub_status daemon/btrfs.c | 268
2015 Feb 13
1
Re: [PATCH v4 1/2] New API: btrfs_balance_status
On Fri, Feb 13, 2015 at 06:06:54PM +0800, Chen Hanxiao wrote: > From: Hu Tao <hutao@cn.fujitsu.com> > > Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> > Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> > --- > daemon/btrfs.c | 126 +++++++++++++++++++++++++++++++ > generator/actions.ml | 10 +++ >
2017 Jul 21
0
[PATCH v2 15/23] daemon: Reimplement ‘btrfs_subvolume_list’ and ‘btrfs_subvolume_get_default’ in OCaml.
...error; - } - - for (i = 0; i < nr_subvolumes; ++i) { - /* To avoid allocations, reuse the 'line' buffer to store the - * path. Thus we don't need to free 'line', since it will be - * freed by the calling (XDR) code. - */ - char *line = lines[i]; -#define N_MATCHES 4 - int ovector[N_MATCHES * 3]; - - if (pcre_exec (re_btrfs_subvolume_list, NULL, line, strlen (line), 0, 0, - ovector, N_MATCHES * 3) < 0) -#undef N_MATCHES - { - unexpected_output: - reply_with_error ("unexpected output from 'btrfs subvolume list'...
2017 Jul 14
0
[PATCH 18/27] daemon: Reimplement ‘btrfs_subvolume_list’ and ‘btrfs_subvolume_get_default’ in OCaml.
...error; - } - - for (i = 0; i < nr_subvolumes; ++i) { - /* To avoid allocations, reuse the 'line' buffer to store the - * path. Thus we don't need to free 'line', since it will be - * freed by the calling (XDR) code. - */ - char *line = lines[i]; -#define N_MATCHES 4 - int ovector[N_MATCHES * 3]; - - if (pcre_exec (re_btrfs_subvolume_list, NULL, line, strlen (line), 0, 0, - ovector, N_MATCHES * 3) < 0) -#undef N_MATCHES - { - unexpected_output: - reply_with_error ("unexpected output from 'btrfs subvolume list'...
2015 Feb 02
0
Re: [PATCH 1/2] New API: btrfs_balance_status
On Mon, Feb 02, 2015 at 02:11:31PM +0800, Hu Tao wrote: [..] So in fact there are a few problems. I couldn't get btrfs balance to actually do anything at all (perhaps it doesn't work on empty filesystems), so this come only from code inspection. > + lines = split_lines (out); > + if (!lines) > + return NULL; > + > + ret = malloc(sizeof *ret); > + if (ret ==
2015 Feb 03
2
[PATCH v2 0/2] add btrfs_balance_status and btrfs_scrub_status
changes in v2: - add check for the length of lines[] - the code parsing 'btrfs scrub -R status' output is changed into a loop Hu Tao (2): New API: btrfs_balance_status New API: btfs_scrub_status. daemon/btrfs.c | 263 +++++++++++++++++++++++++++++++ generator/actions.ml | 26 +++ generator/structs.ml | 34 ++++
2015 Feb 02
5
[PATCH 1/2] New API: btrfs_balance_status
Signed-off-by: Hu Tao <hutao at cn.fujitsu.com> --- These two patches are refactored to parse the output info structures. daemon/btrfs.c | 109 +++++++++++++++++++++++++++++++ generator/actions.ml | 10 +++ generator/structs.ml | 12 ++++ gobject/Makefile.inc | 2 + java/Makefile.inc
2015 Feb 15
4
[PATCH v5 0/2] add btrfs_balance_status and btrfs_scrub_status
v5: - fix tests failure v4: - add reply_with_error when nlines < 1 - remove `i == X' tests. v3: - rebase on upstream - fix some comments v2: - add check for the length of lines[] - the code parsing 'btrfs scrub -R status' output is changed into a loop Hu Tao (2): New API: btrfs_balance_status New API: btfs_scrub_status daemon/btrfs.c
2015 Feb 11
4
[PATCH v3 0/2] add btrfs_balance_status and btrfs_scrub_status
v3: - rebase on upstream - fix some comments v2: - add check for the length of lines[] - the code parsing 'btrfs scrub -R status' output is changed into a loop Hu Tao (2): New API: btrfs_balance_status New API: btfs_scrub_status daemon/btrfs.c | 263 +++++++++++++++++++++++++++++++ generator/actions.ml | 26 +++
2014 Sep 04
10
[PATCH 0/5] use augeas for /etc/shadow
Hi, currently /etc/shadow is edited manually when needed (i.e. when setting the password for an user), and it is not changed when removing users. Import the upstream shadow.aug (currently in their development serie, but not part of any released version yet), and use it only when the augeas version is less than a potential 1.2.1 (covering also the case when the new version is just 1.3.0). Pino
2015 Jul 13
1
[PATCH] daemon: add a space after func name to fit code-style
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- daemon/blkid.c | 2 +- daemon/btrfs.c | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/daemon/blkid.c b/daemon/blkid.c index 1ac42b4..74d2fa6 100644 --- a/daemon/blkid.c +++ b/daemon/blkid.c @@ -199,7 +199,7 @@ error: } static char ** -blkid_without_p_i_opt(const char
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...ize); return NULL; diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 50b0ba8..ddb029d 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -517,26 +517,26 @@ do_btrfs_subvolume_list (const mountable_t *fs) * freed by the calling (XDR) code. */ char *line = lines[i]; - #define N_MATCHES 4 +#define N_MATCHES 4 int ovector[N_MATCHES * 3]; if (pcre_exec (re, NULL, line, strlen (line), 0, 0, ovector, N_MATCHES * 3) < 0) - #undef N_MATCHES - { - unexpected_output: - reply_with_error ("unexpected output from 'btrfs subvolume list...
2015 Oct 05
3
[PATCH 1/2] Change 'fprintf (stdout,...)' -> printf.
Result of earlier copy and paste. --- align/scan.c | 35 ++++++++++--------- cat/cat.c | 39 +++++++++++---------- cat/filesystems.c | 69 +++++++++++++++++++------------------- cat/log.c | 35 ++++++++++--------- cat/ls.c | 61 +++++++++++++++++---------------- df/main.c | 43 ++++++++++++------------ diff/diff.c | 67
2017 Jun 05
19
[PATCH v3 00/19] Allow APIs to be implemented in OCaml.
v2 was here: https://www.redhat.com/archives/libguestfs/2017-June/msg00008.html This series gets as far as a working (and faster) reimplementation of ‘guestfs_list_filesystems’. I also have another patch series on top of this one which reimplements the inspection APIs inside the daemon, but that needs a bit more work still, since inspection turns out to be a very large piece of code. Rich.
2017 Jul 27
23
[PATCH v3 00/23] Reimplement many daemon APIs in OCaml.
I think this fixes everything mentioned: - Added the Optgroups module as suggested. - Remove command temporary files. - Replace command ~flags with ?fold_stdout_on_stderr. - Nest _with_mounted function. - Rebase & retest. Rich.