Displaying 20 results from an estimated 38 matches for "set_int".
2018 Aug 20
1
[PATCH] common/mltools: getopt: add Getopt.OptString
..."internal error: unhandled Tag_val (actionv) = %d",
diff --git a/common/mltools/getopt.ml b/common/mltools/getopt.ml
index 9d20855f7..da461457b 100644
--- a/common/mltools/getopt.ml
+++ b/common/mltools/getopt.ml
@@ -31,6 +31,7 @@ type spec =
| 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, _)...
2018 Aug 21
0
[PATCH 1/2] common/mltools: getopt: add Getopt.OptString
..."internal error: unhandled Tag_val (actionv) = %d",
diff --git a/common/mltools/getopt.ml b/common/mltools/getopt.ml
index 9d20855f7..da461457b 100644
--- a/common/mltools/getopt.ml
+++ b/common/mltools/getopt.ml
@@ -31,6 +31,7 @@ type spec =
| 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, _)...
2003 Sep 10
1
Patch for auto-creating home directories
...ned int parent_dir_umask;
unsigned int umask;
int mail_drop_priv_before_exec;
*** ./src/master/master-settings.c.orig Wed Sep 10 12:13:59 2003
--- ./src/master/master-settings.c Wed Sep 10 12:14:40 2003
***************
*** 67,72 ****
--- 67,73 ----
DEF(SET_BOOL, mbox_read_dotlock),
DEF(SET_INT, mbox_lock_timeout),
DEF(SET_INT, mbox_dotlock_change_timeout),
+ DEF(SET_INT, parent_dir_umask),
DEF(SET_INT, umask),
DEF(SET_BOOL, mail_drop_priv_before_exec),
***************
*** 180,185 ****
--- 181,187 ----
MEMBER(mbox_read_dotlock) FALSE,
MEMBER(mbox_lock_timeout) 300,
MEM...
2016 Jul 15
0
[PATCH 3/3] mllib: tests: Add tests of the new Getopt module.
...quot;string", add_string), "Add string";
+ [ S 'c'; L"clear" ], Getopt.Clear clear_flag, "Clear flag";
+ [ S 'i'; L"int" ], Getopt.Int ("int", add_int), "Add int";
+ [ L"si"; L"set-int" ], Getopt.Set_int ("int", si), "Set int";
+ [ L"ss"; L"set-string"], Getopt.Set_string ("string", ss), "Set string";
+ [ S 't'; L"set" ], Getopt.Set set_flag, "Set flag";
+]
+
+let usage_msg = sprintf "%s: test the Getopt...
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))
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
2003 Apr 15
1
PATCH allow_zero_gid option
...ome/cvs/dovecot/src/master/master-settings.c,v
retrieving revision 1.16
diff -u -3 -p -r1.16 master-settings.c
--- src/master/master-settings.c 2 Apr 2003 02:09:41 -0000 1.16
+++ src/master/master-settings.c 15 Apr 2003 17:37:28 -0000
@@ -46,6 +46,7 @@ static struct setting_def setting_defs[]
DEF(SET_INT, max_mail_processes),
DEF(SET_BOOL, verbose_proctitle),
+ DEF(SET_BOOL, allow_zero_gid),
DEF(SET_INT, first_valid_uid),
DEF(SET_INT, last_valid_uid),
DEF(SET_INT, first_valid_gid),
@@ -153,6 +154,7 @@ struct settings default_settings = {
MEMBER(max_mail_processes) 1024,
MEMBER(verbose...
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.
2007 Jun 07
0
[PATCH] Remove unimplemented xm migrate --resource option
...#39;': self.dom.domid})
diff --git a/tools/python/xen/xm/migrate.py b/tools/python/xen/xm/migrate.py
--- a/tools/python/xen/xm/migrate.py
+++ b/tools/python/xen/xm/migrate.py
@@ -43,10 +43,6 @@ gopts.opt(''port'', short=''p'', val=''portnu
fn=set_int, default=0,
use="Use specified port for migration.")
-gopts.opt(''resource'', short=''r'', val=''MBIT'',
- fn=set_int, default=0,
- use="Set level of resource usage for migration.")
-
def help():...
2003 Mar 01
0
patch for src/auth/db-ldap.c
...T_STR, default_pass_scheme),
! DEF(SET_STR, user_global_uid),
! DEF(SET_STR, user_global_gid)
};
struct ldap_settings default_ldap_settings = {
--- 35,42 ----
DEF(SET_STR, pass_attrs),
DEF(SET_STR, pass_filter),
DEF(SET_STR, default_pass_scheme),
! DEF(SET_INT, user_global_uid),
! DEF(SET_INT, user_global_gid)
};
struct ldap_settings default_ldap_settings = {
--
Alex Howansky
Wankwood Associates
http://www.wankwood.com/
2016 Jul 18
2
[PATCH] mllib: Getopt: fix integer parsing
...fprintf (stderr, _("'%s' is not a numeric value.\n"),
- guestfs_int_program_name);
- show_error (EXIT_FAILURE);
- }
+ num = strtoint (optarg);
v = Field (actionv, 1);
do_call1 (v, Val_int (num));
break;
case 6: /* Set_int of string * int ref */
- if (sscanf (optarg, "%d", &num) != 1) {
- fprintf (stderr, _("'%s' is not a numeric value.\n"),
- guestfs_int_program_name);
- show_error (EXIT_FAILURE);
- }
+ num = strtoint (optarg);
caml_...
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.
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.
2018 Aug 23
3
[PATCH v2 0/2] add output selection for --machine-readable
Hi,
this adds the possibility to select the output for --machine-readable
in OCaml tools.
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 possible to add additional output for
2007 Jul 25
2
Allowing tilde at start of mailbox names
...>pop3_reuse_xuidl)
diff -r a23be6956727 -r ab9cf3790ea9 src/master/master-settings-defs.c
--- a/src/master/master-settings-defs.c Tue Jul 24 05:48:03 2007 +0300
+++ b/src/master/master-settings-defs.c Wed Jul 25 14:08:43 2007 +0100
@@ -67,6 +67,7 @@ static struct setting_def setting_defs[]
DEF(SET_INT, mailbox_idle_check_interval),
DEF(SET_BOOL, mail_debug),
DEF(SET_BOOL, mail_full_filesystem_access),
+ DEF(SET_BOOL, mail_allow_tilde),
DEF(SET_INT, mail_max_keyword_length),
DEF(SET_BOOL, mail_save_crlf),
DEF(SET_BOOL, mail_read_mmaped),
diff -r a23be6956727 -r ab9cf3790ea9 src/master/m...
2016 Aug 19
1
[PATCH] virt-rescue rewrite in OCaml
Hi, I tried to rewrite virt-rescue from C to OCaml.
Goals were feature parity with C implementation, smaller codebase and
hopefully better maintainability. I still don't know if I've covered
everything right. So, please check it out.
PS: my git send-email seems to be broken, so I'm sending it from thunderbird
Thanks!
maros
2016 Jul 15
0
[PATCH 1/3] mllib: Fix parsing of integers on the command line and use correct int type.
...) {
fprintf (stderr, _("'%s' is not a numeric value.\n"),
guestfs_int_program_name);
show_error (EXIT_FAILURE);
@@ -284,7 +286,8 @@ guestfs_int_mllib_getopt_parse (value argsv, value specsv, value anon_funv, valu
break;
case 6: /* Set_int of string * int ref */
- if (sscanf (optarg, "%d", &num) != 1) {
+ if (sscanf (optarg, "%ld%n", &num, &nchars) < 1
+ || optarg[nchars] != '\0') {
fprintf (stderr, _("'%s' is not a numeric value.\n"),...
2016 Jul 18
0
Re: [PATCH] mllib: Getopt: fix integer parsing
...s not a numeric value.\n"),
> - guestfs_int_program_name);
> - show_error (EXIT_FAILURE);
> - }
> + num = strtoint (optarg);
> v = Field (actionv, 1);
> do_call1 (v, Val_int (num));
> break;
>
> case 6: /* Set_int of string * int ref */
> - if (sscanf (optarg, "%d", &num) != 1) {
> - fprintf (stderr, _("'%s' is not a numeric value.\n"),
> - guestfs_int_program_name);
> - show_error (EXIT_FAILURE);
> - }
> + num = s...
2016 Jul 13
3
[PATCH v3 1/2] OCaml tools: add and use a Getopt module
...se 1: /* Set of bool ref */
+ case 2: /* Clear of bool ref */
+ has_arg = 0;
+ break;
+
+ case 3: /* String of string * (string -> unit) */
+ case 4: /* Set_string of string * string ref */
+ case 5: /* Int of string * (int -> unit) */
+ case 6: /* Set_int of string * int ref */
+ has_arg = 1;
+ break;
+
+ default:
+ error (EXIT_FAILURE, 0,
+ "internal error: unhandled Tag_val (actionv) = %d",
+ Tag_val (actionv));
+ }
+
+ if (key_len == 2) { /* Single letter short option. */...