search for: check_option_format_consumed

Displaying 16 results from an estimated 16 matches for "check_option_format_consumed".

2016 May 05
1
[PATCH] tools: improve reporting for option errors (RHBZ#1316041)
...+++++++++--- inspector/inspector.c | 12 ++++++++++-- rescue/rescue.c | 12 ++++++++++-- 10 files changed, 87 insertions(+), 22 deletions(-) diff --git a/cat/cat.c b/cat/cat.c index 0370fbd..4d671ca 100644 --- a/cat/cat.c +++ b/cat/cat.c @@ -224,8 +224,11 @@ main (int argc, char *argv[]) CHECK_OPTION_format_consumed; /* User must have specified some drives. */ - if (drvs == NULL) + if (drvs == NULL) { + fprintf (stderr, _("%s: error: you must specify at least one -a or -d option.\n"), + guestfs_int_program_name); usage (EXIT_FAILURE); + } /* Add drives, inspect and mo...
2020 Feb 13
0
[PATCH v3 1/1] tools: add '--blocksize' option for C-based tools
...} else if (STREQ (long_options[option_index].name, "blocksize")) { + OPTION_blocksize; } else if (STREQ (long_options[option_index].name, "uuid")) { uuid = 1; } else @@ -215,6 +222,7 @@ main (int argc, char *argv[]) usage (EXIT_FAILURE); CHECK_OPTION_format_consumed; + CHECK_OPTION_blocksize_consumed; /* virt-alignment-scan has two modes. If the user didn't specify * any drives, then we do the scan on every libvirt guest. That's diff --git a/align/virt-alignment-scan.pod b/align/virt-alignment-scan.pod index 19953546e..83645f4d0 100644 ---...
2020 Feb 12
0
[PATCH v2 1/1] tools: add '--blocksize' option for C-based tools
...} else if (STREQ (long_options[option_index].name, "blocksize")) { + OPTION_blocksize; } else if (STREQ (long_options[option_index].name, "uuid")) { uuid = 1; } else @@ -215,6 +222,7 @@ main (int argc, char *argv[]) usage (EXIT_FAILURE); CHECK_OPTION_format_consumed; + CHECK_OPTION_blocksize_consumed; /* virt-alignment-scan has two modes. If the user didn't specify * any drives, then we do the scan on every libvirt guest. That's diff --git a/align/virt-alignment-scan.pod b/align/virt-alignment-scan.pod index 19953546e..83f500fde 100644 ---...
2020 Feb 13
2
[PATCH v3 0/1] tools: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com> This patch depends on changes in 'common' sub-module posted here: https://www.redhat.com/archives/libguestfs/2020-February/msg00150.html v3 fixes issue found during code review: - options now appear in alphabetical order v2: Almost the same as v1 except '--blocksize' option description is moved into a common submodule (similar to
2020 Feb 12
3
[PATCH v2 0/1] tools: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com> This patch depends on changes in 'common' sub-module posted here: https://www.redhat.com/archives/libguestfs/2020-February/msg00099.html v2: Almost the same as v1 except '--blocksize' option description is moved into a common submodule (similar to key-option.pod). v1 was here:
2020 Feb 11
0
[PATCH 1/1] tools: add '--blocksize' option for C-based tools
...} else if (STREQ (long_options[option_index].name, "blocksize")) { + OPTION_blocksize; } else if (STREQ (long_options[option_index].name, "uuid")) { uuid = 1; } else @@ -215,6 +222,7 @@ main (int argc, char *argv[]) usage (EXIT_FAILURE); CHECK_OPTION_format_consumed; + CHECK_OPTION_blocksize_consumed; /* virt-alignment-scan has two modes. If the user didn't specify * any drives, then we do the scan on every libvirt guest. That's diff --git a/align/virt-alignment-scan.pod b/align/virt-alignment-scan.pod index 19953546e..21b5339e0 100644 ---...
2020 Feb 11
2
[PATCH 0/1] tools: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com> This patch depends on changes in 'common' sub-module posted here: https://www.redhat.com/archives/libguestfs/2020-February/msg00096.html Nikolay Ivanets (1): tools: add '--blocksize' option for C-based tools align/scan.c | 8 ++++++++ align/virt-alignment-scan.pod | 12 ++++++++++++ cat/cat.c
2017 Apr 28
2
[PATCH] common/options: Change drv struct to store drive index instead of device name.
...rgc, char *argv[]) if (!drv) error (EXIT_FAILURE, errno, "calloc"); drv->type = drv_N; - drv->nr_drives = -1; p = strchr (optarg, '='); if (p != NULL) { *p = '\0'; @@ -466,7 +465,7 @@ main (int argc, char *argv[]) CHECK_OPTION_format_consumed; /* If we've got drives to add, add them now. */ - add_drives (drvs, 'a'); + add_drives (drvs, 0); /* If we've got mountpoints or prepared drives or -i option, we must * launch the guest and mount them. @@ -586,8 +585,13 @@ prepare_drives (struct drv *drv) { if (...
2016 Oct 03
3
[PATCH v2 0/2] New tool: virt-tail.
Nothing new in the virt-tail command itself, but the second commit includes a simple test. Rich.
2016 Oct 03
0
[PATCH v2 1/2] New tool: virt-tail.
...here that they have known-good + * values. + */ + assert (read_only == 1); + assert (inspector == 1 || mps != NULL); + assert (live == 0); + + /* User must specify at least one filename on the command line. */ + if (optind >= argc || argc - optind < 1) + usage (EXIT_FAILURE); + + CHECK_OPTION_format_consumed; + + /* User must have specified some drives. */ + if (drvs == NULL) { + fprintf (stderr, _("%s: error: you must specify at least one -a or -d option.\n"), + getprogname ()); + usage (EXIT_FAILURE); + } + + r = do_tail (argc - optind, &argv[optind], drvs, mps); +...
2016 Oct 01
1
[PATCH] New tool: virt-tail.
This adds a new tool which does a follow operation (ie. tail -f) on one or more log/text files inside the guest. I've only done limited testing, but it works for me for tailing various long-running builds inside guests which I'm doing at the moment. There are no tests at present. Rich.
2016 Oct 03
0
[PATCH v3 1/2] New tool: virt-tail.
...nd line. */ + if (optind >= argc || argc - optind < 1) { + fprintf (stderr, _("%s: error: missing filenames on command line.\n" + "Please specify at least one file to follow.\n"), + getprogname ()); + usage (EXIT_FAILURE); + } + + CHECK_OPTION_format_consumed; + + /* User must have specified some drives. */ + if (drvs == NULL) { + fprintf (stderr, _("%s: error: you must specify at least one -a or -d option.\n"), + getprogname ()); + usage (EXIT_FAILURE); + } + + r = do_tail (argc - optind, &argv[optind], drvs, mps); +...
2016 Oct 03
1
Re: [PATCH v2 1/2] New tool: virt-tail.
...ptind < 1) > + usage (EXIT_FAILURE); I'd add: fprintf (stderr, _("%s: error: missing filenames on command line.\n" "Please specify at least one file to follow.\n"), getprogname ()); so there is a better error message. > + > + CHECK_OPTION_format_consumed; > + > + /* User must have specified some drives. */ > + if (drvs == NULL) { > + fprintf (stderr, _("%s: error: you must specify at least one -a or -d option.\n"), > + getprogname ()); > + usage (EXIT_FAILURE); > + } > + > + r = do_tail (ar...
2016 Oct 03
3
[PATCH v3 0/2] New tool: virt-tail.
Since v2: - Fix the things that Pino mentioned, except the recursion. - Implement Windows support. For Windows support to be sane, I had to inline the add_and_mount code. Rich.
2018 Sep 19
0
[PATCH 2/2] Introduce a --key option in tools that accept keys
...mat, struct drv **drvsp); @@ -219,6 +250,9 @@ extern void free_mps (struct mp *mp); #define OPTION_x \ guestfs_set_trace (g, 1) +#define OPTION_key \ + ks = key_store_add_from_selector (ks, optarg) + #define CHECK_OPTION_format_consumed \ do { \ if (!format_consumed) { \ diff --git a/customize/customize_main.ml b/customize/customize_main.ml index b4da87368..8a022342f 100644 --- a/c...
2018 Sep 19
5
[PATCH 0/2] RFC: --key option for tools
Hi, the following series adds a --key option in the majority of tools: this makes it possible to pass LUKS credentials programmatically, avoid the need to manually input them, or unsafely pass them via stdin. Thanks, Pino Toscano (2): mltools: create a cmdline_options struct Introduce a --key option in tools that accept keys builder/cmdline.ml | 2 +-