Displaying 20 results from an estimated 22 matches for "show_help".
2012 Sep 14
1
[PATCH] xenpm: make argument parsing and error handling more consistent
...stionable cases).
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/tools/misc/xenpm.c
+++ b/tools/misc/xenpm.c
@@ -36,7 +36,7 @@
#define CPUFREQ_TURBO_ENABLED 1
static xc_interface *xc_handle;
-static int max_cpu_nr;
+static unsigned int max_cpu_nr;
/* help message */
void show_help(void)
@@ -77,6 +77,33 @@ void help_func(int argc, char *argv[])
show_help();
}
+static void parse_cpuid(const char *arg, int *cpuid)
+{
+ if ( sscanf(arg, "%d", cpuid) != 1 || *cpuid < 0 )
+ {
+ if ( strcasecmp(arg, "all") )
+ {
+ fprint...
2010 Mar 10
2
[Bug 26992] New: Systemsettings crashes when I try to open desktop settings
...(QObject*, QEvent*) () from
/usr/lib/libQtGui.so.4
#26 0x00007fc5e28fade6 in KApplication::notify(QObject*, QEvent*) () from
/usr/lib/libkdeui.so.5
#27 0x00007fc5e0fddddc in QCoreApplication::notifyInternal(QObject*, QEvent*)
() from /usr/lib/libQtCore.so.4
#28 0x00007fc5e1c4fcda in QWidgetPrivate::show_helper() () from
/usr/lib/libQtGui.so.4
#29 0x00007fc5e1c4ffb1 in QWidgetPrivate::showChildren(bool) () from
/usr/lib/libQtGui.so.4
#30 0x00007fc5e1c4fbcf in QWidgetPrivate::show_helper() () from
/usr/lib/libQtGui.so.4
#31 0x00007fc5e1c51e5a in QWidget::setVisible(bool) () from
/usr/lib/libQtGui.so.4
#3...
2016 Jul 11
0
Re: [PATCH v2] OCaml tools: add and use a Getopt module
...paramv);
> +
> + if (Is_exception_result (rv))
> + fprintf (stderr,
> + "libguestfs: uncaught OCaml exception in getopt callback: %s",
Does this need \n?
> + case 0:
> + if (STREQ (longopts[option_index].name, "help")) {
> + show_help (specsv, usage_msgv);
> + }
> + /* specv_index set already -- nothing to do. */
> + break;
> +
> + case 'h':
> + show_help (specsv, usage_msgv);
> + break;
Is this right? Several commands (eg. virt-df) take a -h option which
isn't for h...
2009 Aug 25
3
[Bug 23505] New: KDE's Kubrick has problems with xf86-video-nouveau driver
...al (this=0xbf8bd86c,
receiver=0x81974b0, event=0xbf8bd644) at kernel/qcoreapplication.cpp:610
#36 0xb6a16aec in QWidgetPrivate::sendPendingMoveAndResizeEvents
(this=0x819fa88, recursive=false, disableUpdates=false) at
../../src/corelib/kernel/qcoreapplication.h:213
#37 0xb6a1d7b6 in QWidgetPrivate::show_helper (this=0x819fa88) at
kernel/qwidget.cpp:6697
#38 0xb6a1dee3 in QWidget::setVisible (this=0x81974b0, visible=true) at
kernel/qwidget.cpp:6975
#39 0xb6a1dcb8 in QWidgetPrivate::showChildren (this=0x818a310,
spontaneous=false) at ../../src/gui/kernel/qwidget.h:473
#40 0xb6a1d7e1 in QWidgetPrivate::sh...
2016 Jul 13
0
[PATCH v3 2/2] mllib: Getopt: support hidden options
...= {
usage_msg : usage_msg;
}
+let hidden_option_description = ""
+
external getopt_parse : string array -> (c_keys * spec * doc) array -> ?anon_fun:anon_fun -> usage_msg -> unit = "guestfs_int_mllib_getopt_parse"
let column_wrap = 38
@@ -56,6 +58,11 @@ let show_help h () =
let prologue = sprintf (f_"%s\nOptions:\n") h.usage_msg in
Buffer.add_string b prologue;
+ let specs = List.filter (
+ fun (_, _, doc) ->
+ doc <> hidden_option_description
+ ) h.specs in
+
List.iter (
fun (keys, spec, doc) ->
let column...
2016 Jul 18
2
Re: [PATCH v2 2/3] mllib: Use L"..." and S '...' for long and short options.
..."--help" keys;
> - ) specs;
> - let help_keys = [] @
> - (if !has_dash_help then [] else [ "-help" ]) @
> - (if !has_dash_dash_help then [] else [ "--help" ]) in
> - let specs = specs @
> - (if help_keys <> [] then [ help_keys, Unit (show_help t), s_"Display brief help"; ] else []) in
> -
> - (* Sort the specs, and set them in the handle. *)
> + (* Sort the specs. *)
> let specs = List.map (
> fun (keys, action, doc) ->
> List.hd (List.sort compare_command_line_args keys), (keys, action,...
2016 Jul 15
5
[PATCH 0/3] mllib: Various fixes and changes to Getopt module.
The second patch is obviously not complete yet - for discussion only.
Rich.
2016 Jul 18
4
[PATCH v2 0/3] mllib: Various fixes and changes to Getopt module.
v1 -> v2:
- Further fixes to Getopt int parsing.
- Completed the L/S changes.
- Fixed the test suite so it passes now. Also we don't need the
special-case tests for 64 bit arch.
Rich.
2018 Aug 20
1
[PATCH] common/mltools: getopt: add Getopt.OptString
...ec =
| Int of string * (int -> unit)
| Set_int of string * int ref
| Symbol of string * string list * (string -> unit)
+ | OptString of string * (string option -> unit)
module OptionName = struct
type option_name = S of char | L of string | M of string
@@ -97,7 +98,8 @@ let show_help h () =
| Set_string (arg, _)
| Int (arg, _)
| Set_int (arg, _)
- | Symbol (arg, _, _) -> Some arg in
+ | Symbol (arg, _, _)
+ | OptString (arg, _) -> Some arg in
(match arg with
| None -> ()
| Some arg ->
@@ -181,6 +18...
2016 Jul 18
0
[PATCH v2 2/3] mllib: Use L"..." and S '...' for long and short options.
...array -> (c_keys * spec * doc) array -> ?anon_fun
let column_wrap = 38
+let string_of_option_name = function
+ | S c -> sprintf "-%c" c
+ | L s -> "--" ^ s
+
+let string_of_option_name_no_dashes = function
+ | S c -> String.make 1 c
+ | L s -> s
+
let show_help h () =
let b = Buffer.create 1024 in
@@ -58,10 +71,11 @@ let show_help h () =
let prologue = sprintf (f_"%s\nOptions:\n") h.usage_msg in
Buffer.add_string b prologue;
- let specs = List.filter (
- fun (_, _, doc) ->
+ let specs =
+ List.filter (
+ fun (_, _, d...
2016 Jul 11
2
[PATCH v2] OCaml tools: add and use a Getopt module
...IST
+#endif
+
+static void
+xwrite (int fd, const void *v_buf, size_t len)
+{
+ int r;
+ const char *buf = v_buf;
+
+ while (len > 0) {
+ r = write (fd, buf, len);
+ if (r == -1)
+ error (EXIT_FAILURE, errno, "write");
+ buf += r;
+ len -= r;
+ }
+}
+
+static void
+show_help (value specsv, value usage_msgv)
+{
+ CAMLparam2 (specsv, usage_msgv);
+ CAMLlocal4 (specv, keysv, actionv, docv);
+ FILE *f;
+ CLEANUP_FREE char *buf = NULL;
+ size_t buf_len = 0;
+ size_t i, specs_len;
+
+ f = open_memstream (&buf, &buf_len);
+ if (f == NULL)
+ error (EXIT_FAIL...
2018 Aug 21
0
[PATCH 1/2] common/mltools: getopt: add Getopt.OptString
...ec =
| Int of string * (int -> unit)
| Set_int of string * int ref
| Symbol of string * string list * (string -> unit)
+ | OptString of string * (string option -> unit)
module OptionName = struct
type option_name = S of char | L of string | M of string
@@ -97,7 +98,8 @@ let show_help h () =
| Set_string (arg, _)
| Int (arg, _)
| Set_int (arg, _)
- | Symbol (arg, _, _) -> Some arg in
+ | Symbol (arg, _, _)
+ | OptString (arg, _) -> Some arg in
(match arg with
| None -> ()
| Some arg ->
@@ -181,6 +18...
2016 Jul 18
3
[PATCH v4 0/2] mllib: Various fixes and changes to Getopt module.
v3 -> v4:
- Pushed the first patch upstream since it was ACKed.
- Prevent use of M except for the special virt-v2v options.
- Sort the options after added --help etc.
- Make corresponding fixes to the tests.
Rich.
2016 Jul 18
4
[PATCH v3 0/3] mllib: Various fixes and changes to Getopt module.
v2 -> v3:
- Add M variant and test it.
Rich.
2016 Jul 13
3
[PATCH v3 1/2] OCaml tools: add and use a Getopt module
...pe t = {
+ mutable specs : speclist;
+ anon_fun : anon_fun option;
+ usage_msg : usage_msg;
+}
+
+external getopt_parse : string array -> (c_keys * spec * doc) array -> ?anon_fun:anon_fun -> usage_msg -> unit = "guestfs_int_mllib_getopt_parse"
+
+let column_wrap = 38
+
+let show_help h () =
+ let b = Buffer.create 1024 in
+
+ let spaces n =
+ String.make n ' ' in
+
+ let prologue = sprintf (f_"%s\nOptions:\n") h.usage_msg in
+ Buffer.add_string b prologue;
+
+ List.iter (
+ fun (keys, spec, doc) ->
+ let columns = ref 0 in
+ let add s =...
2018 Aug 21
4
[PATCH 0/2] RFC: add output selection for --machine-readable
Hi,
this is a first approach (hence RFC, since it misses tests &
documentation) in selecting the output for --machine-readable.
The possible choices are:
* --machine-readable: to stdout, like before
* --machine-readable=file:name-of-file: to the specified file
* --machine-readable=stream:stdout: explicitly to stdout
* --machine-readable=stream:stderr: explicitly to stderr
This makes it
2013 Mar 27
1
[PATCH] Fix option names in documentation and help messages.
...lt;term><option>--no-residual-gnuplot</option></term>
<term><option>--no-residual-text</option></term>
diff --git a/src/flac/main.c b/src/flac/main.c
index 3880d09..a8186e8 100644
--- a/src/flac/main.c
+++ b/src/flac/main.c
@@ -1281,6 +1281,7 @@ void show_help(void)
printf(" --force-wave64-format Force decoding to Wave64 format\n");
printf("negative options:\n");
printf(" --no-adaptive-mid-side\n");
+ printf(" --no-cued-seekpoints\n");
printf(" --no-decode-through-errors\n")...
2014 Nov 10
0
[PATCH] Update documentation for new compression presets
...t; <td>false</td> <td>0</td> <td>6</td> <td>0</td> </tr>
* </table>
*
* \default \c 5
diff --git a/src/flac/main.c b/src/flac/main.c
index 2eb8643..44894ac 100644
--- a/src/flac/main.c
+++ b/src/flac/main.c
@@ -1274,8 +1274,8 @@ void show_help(void)
printf(" -4, --compression-level-4 Synonymous with -l 8 -b 4096 -M -r 4\n");
printf(" -5, --compression-level-5 Synonymous with -l 8 -b 4096 -m -r 5\n");
printf(" -6, --compression-level-6 Synonymous with -l 8 -b 4096 -m -r 6\n"...
2016 Jul 18
4
[PATCH 1/3] mllib: Getopt: point to man page as additional help
On error, point also to the man page of the current tool in addition to
'$TOOL --help'.
---
mllib/getopt-c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mllib/getopt-c.c b/mllib/getopt-c.c
index bf40f91..3efd5d3 100644
--- a/mllib/getopt-c.c
+++ b/mllib/getopt-c.c
@@ -69,8 +69,8 @@ cleanup_option_list (void *ptr)
static void __attribute__((noreturn))
2016 Jun 02
0
[ANNOUNCE] nftables 0.6 release
...inearize: support parsing statements not contained within a rule
stmt: support generating stateful statements outside of rule context
src: add flow statement
Piyush Pangtey (3):
doc: nft: Fixed a typo and added/changed punctuation
nft: Modified punctuation used in nft's show_help
rule: Remove memory leak
Shivani Bhardwaj (5):
src: datatype: Modify symbol table for icmpv6 packet types
ip6: Add tests for icmpv6 packet types
src: netlink_linearize: Fix bug for redirect target
src: Add support for masquerade port selection
src: evaluate: Sho...