search for: option_index

Displaying 20 results from an estimated 142 matches for "option_index".

2020 Feb 13
0
[PATCH v3 1/1] tools: add '--blocksize' option for C-based tools
...{ "domain", 1, 0, 'd' }, { "format", 2, 0, 0 }, @@ -131,6 +134,8 @@ main (int argc, char *argv[]) struct drv *drvs = NULL; const char *format = NULL; bool format_consumed = true; + int blocksize = 0; + bool blocksize_consumed = true; int c; int option_index; int exit_code; @@ -153,6 +158,8 @@ main (int argc, char *argv[]) display_short_options (options); else if (STREQ (long_options[option_index].name, "format")) { OPTION_format; + } else if (STREQ (long_options[option_index].name, "blocksize")) { +...
2020 Feb 12
0
[PATCH v2 1/1] tools: add '--blocksize' option for C-based tools
...{ "long-options", 0, 0, 0 }, { "quiet", 0, 0, 'q' }, @@ -131,6 +134,8 @@ main (int argc, char *argv[]) struct drv *drvs = NULL; const char *format = NULL; bool format_consumed = true; + int blocksize = 0; + bool blocksize_consumed = true; int c; int option_index; int exit_code; @@ -153,6 +158,8 @@ main (int argc, char *argv[]) display_short_options (options); else if (STREQ (long_options[option_index].name, "format")) { OPTION_format; + } else if (STREQ (long_options[option_index].name, "blocksize")) { +...
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
...{ "long-options", 0, 0, 0 }, { "quiet", 0, 0, 'q' }, @@ -131,6 +134,8 @@ main (int argc, char *argv[]) struct drv *drvs = NULL; const char *format = NULL; bool format_consumed = true; + int blocksize = 0; + bool blocksize_consumed = true; int c; int option_index; int exit_code; @@ -153,6 +158,8 @@ main (int argc, char *argv[]) display_short_options (options); else if (STREQ (long_options[option_index].name, "format")) { OPTION_format; + } else if (STREQ (long_options[option_index].name, "blocksize")) { +...
2014 Nov 26
5
[PATCH] tools: implement --short-options
...ot;short-options", 0, 0, 0 }, { "uuid", 0, 0, 0, }, { "verbose", 0, 0, 'v' }, { "version", 0, 0, 'V' }, @@ -143,6 +144,8 @@ main (int argc, char *argv[]) case 0: /* options which are long only */ if (STREQ (long_options[option_index].name, "long-options")) display_long_options (long_options); + else if (STREQ (long_options[option_index].name, "short-options")) + display_short_options (options); else if (STREQ (long_options[option_index].name, "format")) { OPTIO...
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
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...reate (); - if (g == NULL) { - fprintf (stderr, _("guestfs_create: failed to create handle\n")); - exit (EXIT_FAILURE); - } + if (g == NULL) + error (EXIT_FAILURE, errno, "guestfs_create"); for (;;) { c = getopt_long (argc, argv, options, long_options, &option_index); diff --git a/cat/cat.c b/cat/cat.c index c90fc06..0370fbd 100644 --- a/cat/cat.c +++ b/cat/cat.c @@ -116,10 +116,8 @@ main (int argc, char *argv[]) int option_index; g = guestfs_create (); - if (g == NULL) { - fprintf (stderr, _("guestfs_create: failed to create handle\n"));...
2016 Aug 25
1
Re: [PATCH 5/5] bash completion: Add missing bash completion scripts (RHBZ#1367738).
...{ "verbose", 0, 0, 'v' }, > { "version", 0, 0, 'V' }, > { 0, 0, 0, 0 } > @@ -108,7 +110,11 @@ main (int argc, char *argv[]) > > switch (c) { > case 0: /* options which are long only */ > - if (STREQ (long_options[option_index].name, "fd")) { > + if (STREQ (long_options[option_index].name, "long-options")) > + display_long_options (long_options); > + else if (STREQ (long_options[option_index].name, "short-options")) > + display_short_options (options); &gt...
2015 Jan 02
2
(no subject)
Hi, we needed these changes when we had to build a guest image compatible with a starting guest image but not backed by it in any way? We needed some tool to check our progress, comparing original and? rebuilt (from scratch) images, and virt-diff seemed the best option, but? we had to soften the comparison to reduce the noise in the output. I added some options to ignore certain informations when
2018 Jun 28
1
[nbdkit PATCH] main: More idiomatic use of getopt_long
...NULL, 'v' }, + { "version", no_argument, NULL, 'V' }, { NULL }, }; @@ -233,25 +244,27 @@ main (int argc, char *argv[]) break; switch (c) { - case 0: /* options which are long only */ - if (strcmp (long_options[option_index].name, "dump-config") == 0) { - dump_config (); - exit (EXIT_SUCCESS); - } - else if (strcmp (long_options[option_index].name, "dump-plugin") == 0) { - dump_plugin = 1; - } - else if (strcmp (long_options[option_index].name, "exit-wi...
2016 Jun 01
2
[PATCH v2] rescue: add --autosysroot option RHBZ#1183493
--autosysroot option uses suggestions to user on how to mount filesystems and change root suggested by --suggest option in virt-rescue. Commands are passed on kernel command line in format guestfs_command=command;. Command ends with a semicolon and there can be multiple commands specified. These are executed just before bash starts. On successfull run user is presented directly with bash in
2015 Jan 02
0
[PATCH] virt-diff: add additional ignore options
...compare-uids", 0, 0, 0 }, + { "no-compare-times", 0, 0, 0 }, + { "no-compare-extra-stats", 0, 0, 0 }, { 0, 0, 0, 0 } }; struct drv *drvs = NULL; /* First guest. */ @@ -260,6 +275,16 @@ main (int argc, char *argv[]) } else if (STREQ (long_options[option_index].name, "xattr") || STREQ (long_options[option_index].name, "xattrs")) { enable_xattrs = 1; + } else if (STREQ (long_options[option_index].name, "no-compare-xattrs")) { + no_compare_xattrs = 1; + } else if (STREQ (long_options...
2008 Apr 04
0
speexdec 1.2.3
...rr, ")\n"); /*fprintf (stderr, "Decoding %d Hz audio at %d bps using %s mode\n", *rate, mode->bitrate, mode->modeName);*/ } *extra_headers = header->extra_headers; free(header); return st; } int main(int argc, char **argv) { int c; int option_index = 0; char *inFile, *outFile; FILE *fin, *fout=NULL; short out[MAX_FRAME_SIZE]; short output[MAX_FRAME_SIZE]; int frame_size=0, granule_frame_size=0; void *st=NULL; SpeexBits bits; int packet_count=0; int stream_init = 0; int quiet = 0; ogg_int64_t page_granule=0, la...
2015 Jan 06
0
[PATCH] virt-diff: add additional ignore options
...{ "compare-times", 1, 0, 0 }, + { "compare-uids", 1, 0, 0 }, + { "compare-xattrs", 1, 0, 0 }, { 0, 0, 0, 0 } }; struct drv *drvs = NULL; /* First guest. */ @@ -260,6 +275,21 @@ main (int argc, char *argv[]) } else if (STREQ (long_options[option_index].name, "xattr") || STREQ (long_options[option_index].name, "xattrs")) { enable_xattrs = 1; + } else if (STREQ (long_options[option_index].name, "compare-extra-stats")) { + if (STREQ (optarg, "no")) + compare_ext...
2016 Jun 01
0
[PATCH v2] rescue: add --autosysroot option RHBZ#1183493
...t -main (int argc, char *argv[]) -{ - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, LOCALEBASEDIR); - textdomain (PACKAGE); - - parse_config (); +struct drv *drvs = NULL; +struct drv *drv; +char **cmds = NULL; +const char *format = NULL; +bool format_consumed = true; +int c; +int option_index; +int network = 0; +char *append = NULL; +int memsize = 0; +int smp = 0; +int suggest = 0; +int autosysroot = 0; +static void +parse_opts(int argc, char * argv[]) +{ enum { HELP_OPTION = CHAR_MAX + 1 }; static const char *options = "a:c:d:m:rvVx"; static const struct option l...
2016 Jul 13
0
[PATCH 5/5] lib: Deprecate old SELinux APIs, rewrite SELinux documentation.
...quot; -V|--version Display version and exit\n" " -w|--rw Mount read-write\n" @@ -267,8 +267,7 @@ main (int argc, char *argv[]) " to the PID of the remote process")); } } else if (STREQ (long_options[option_index].name, "selinux")) { - if (guestfs_set_selinux (g, 1) == -1) - exit (EXIT_FAILURE); + /* nothing */ } else if (STREQ (long_options[option_index].name, "keys-from-stdin")) { keys_from_stdin = 1; } else if (STREQ (long_options[option_i...
2016 May 24
1
[PATCH] rescue: add --autosysroot option RHBZ#1183493
--autosysroot option uses suggestions to user on how to mount filesystems and change root suggested by --suggest option in virt-rescue. Commands are passed on kernel command line in format guestfs_command=command;. Command ends with a semicolon and there can be multiple commands specified. These are executed just before bash starts. On successfull run user is presented directly with bash in
2016 Apr 26
3
[opus-tools] [PATCH] Add channel-mapping argument to force channel mapping
...hard_cbr=0; int with_cvbr=0; int expect_loss=0; @@ -465,6 +469,12 @@ int main(int argc, char **argv) fprintf(stderr,"Expected loss is a percent and must be 0-100.\n"); exit(1); } + }else if(strcmp(long_options[option_index].name,"channel-mapping")==0){ + channel_mapping=atoi(optarg); + if(channel_mapping < 0 || channel_mapping > 255){ + fprintf(stderr,"Invalid channel-mapping: %s\n",optarg); + exit(1); + } }else if(strcmp(long_options...
2016 Jul 14
0
[PATCH v2 6/7] lib: Deprecate old SELinux APIs, rewrite SELinux documentation.
...quot; -V|--version Display version and exit\n" " -w|--rw Mount read-write\n" @@ -267,8 +267,7 @@ main (int argc, char *argv[]) " to the PID of the remote process")); } } else if (STREQ (long_options[option_index].name, "selinux")) { - if (guestfs_set_selinux (g, 1) == -1) - exit (EXIT_FAILURE); + /* nothing */ } else if (STREQ (long_options[option_index].name, "keys-from-stdin")) { keys_from_stdin = 1; } else if (STREQ (long_options[option_i...