search for: compresslevel_s

Displaying 8 results from an estimated 8 matches for "compresslevel_s".

Did you mean: compresslevel
2015 Mar 05
1
Re: [PATCH 1/2] New API: btrfs-image
On Tue, Mar 03, 2015 at 03:48:02AM -0500, Chen Hanxiao wrote: > Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> > + if (compresslevel >= 0) { > + snprintf (compresslevel_s, sizeof compresslevel_s, "%d", compresslevel); > + ADD_ARG (argv, i, "-c"); > + ADD_ARG (argv, i, compresslevel_s); > + } Because compresslevel is an optional parameter, you can't just use it directly like this. You have to check optargs_bitmask. The condi...
2015 Mar 03
4
[PATCH 0/2] btrfs: add support to btrfs-image
This series adds new APIs to support btrfstune. Chen Hanxiao (2): New API: btrfs-image New API: btrfs_image_restore daemon/btrfs.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/actions.ml | 45 +++++++++++++++++++++++++++ src/MAX_PROC_NR | 2 +- 3 files changed, 133 insertions(+), 1 deletion(-) -- 2.1.0
2015 Mar 03
0
[PATCH 1/2] New API: btrfs-image
...har *const *sources, const char *image, + int compresslevel, int numthreads) +{ + size_t nr_sources = count_strings (sources); + const size_t MAX_ARGS = 64 + nr_sources; + const char *argv[MAX_ARGS]; + size_t i = 0, j; + CLEANUP_FREE char *err = NULL; + CLEANUP_FREE char *out = NULL; + char compresslevel_s[64]; + char numthreads_s[64]; + int r; + + if (nr_sources == 0) { + reply_with_error ("list of sources must be non-empty"); + return -1; + } + + ADD_ARG (argv, i, str_btrfsimage); + + if (compresslevel >= 0) { + snprintf (compresslevel_s, sizeof compresslevel_s, &quo...
2015 Mar 24
1
[PATCH v3] New API: btrfs-image
...o_btrfs_image (char *const *sources, const char *image, + int compresslevel) +{ + size_t nr_sources = count_strings (sources); + const size_t MAX_ARGS = 64 + nr_sources; + const char *argv[MAX_ARGS]; + size_t i = 0, j; + CLEANUP_FREE char *err = NULL; + CLEANUP_FREE char *out = NULL; + char compresslevel_s[64]; + int r; + + if (nr_sources == 0) { + reply_with_error ("list of sources must be non-empty"); + return -1; + } + + ADD_ARG (argv, i, str_btrfsimage); + + if ((optargs_bitmask & GUESTFS_BTRFS_IMAGE_COMPRESSLEVEL_BITMASK) + && compresslevel >= 0) { +...
2015 Mar 17
2
[PATCH v2] New API: btrfs-image
...har *const *sources, const char *image, + int compresslevel, int numthreads) +{ + size_t nr_sources = count_strings (sources); + const size_t MAX_ARGS = 64 + nr_sources; + const char *argv[MAX_ARGS]; + size_t i = 0, j; + CLEANUP_FREE char *err = NULL; + CLEANUP_FREE char *out = NULL; + char compresslevel_s[64]; + char numthreads_s[64]; + int r; + + if (nr_sources == 0) { + reply_with_error ("list of sources must be non-empty"); + return -1; + } + + ADD_ARG (argv, i, str_btrfsimage); + + if ((optargs_bitmask & GUESTFS_BTRFS_IMAGE_COMPRESSLEVEL_BITMASK) + && com...
2015 Jun 16
1
[PATCH] btrfs: remove unused 'out' variables
...); if (r == -1) { reply_with_error ("%s: %s", device, err); return -1; @@ -2051,7 +2032,6 @@ do_btrfs_image (char *const *sources, const char *image, const char *argv[MAX_ARGS]; size_t i = 0, j; CLEANUP_FREE char *err = NULL; - CLEANUP_FREE char *out = NULL; char compresslevel_s[64]; int r; @@ -2075,7 +2055,7 @@ do_btrfs_image (char *const *sources, const char *image, ADD_ARG (argv, i, image); ADD_ARG (argv, i, NULL); - r = commandv (&out, &err, argv); + r = commandv (NULL, &err, argv); if (r == -1) { reply_with_error ("%s %s: %s&quo...
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...eply_with_error ("list of sources must be non-empty"); + return -1; } ADD_ARG (argv, i, str_btrfsimage); if ((optargs_bitmask & GUESTFS_BTRFS_IMAGE_COMPRESSLEVEL_BITMASK) - && compresslevel >= 0) { + && compresslevel >= 0) { snprintf (compresslevel_s, sizeof compresslevel_s, "%d", compresslevel); ADD_ARG (argv, i, "-c"); ADD_ARG (argv, i, compresslevel_s); @@ -2157,7 +2157,7 @@ do_btrfs_image (char *const *sources, const char *image, int do_btrfs_replace (const char *srcdev, const char *targetdev, -...
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