search for: parse_selector

Displaying 17 results from an estimated 17 matches for "parse_selector".

2014 Nov 03
0
[PATCH] customize: Add --ssh-inject option for injecting SSH keys.
...c., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + *) + +open Common_gettext.Gettext +open Common_utils + +open Customize_utils + +open Printf +open Sys +open Unix + +module G = Guestfs + +type ssh_key_selector = +| SystemKey +| KeyFile of string +| KeyString of string + +let rec parse_selector arg = + parse_selector_list arg (string_nsplit ":" arg) + +and parse_selector_list orig_arg = function + | [] | [ "" ] -> + SystemKey + | [ "file"; f ] -> + KeyFile f + | [ "string"; s ] -> + KeyString s + | _ -> + error (f_"...
2006 Jan 03
2
match mark problem still resists
...is a steady problem that occurs in kernel 2.4 series and match mark (at least for me). I browsed thru the source codes but run thru a wall of bricks at some point. I have a single question to developers of TC: Isn''t it strange that my problem be related to the only match inside ''parse_selector'' that is treated differently from other matches? All except ''mark'' is parsed like parse_xxxx(&argc, &argv, sel, ..) and mark is parsed parse_mark(&argc, &argv, n,..) where sel is a struct tc_u32_sel and n is a struct nlmsghdr. I should say that this de...
2014 Nov 02
3
[PATCH] customize: Add --ssh-inject option for injecting SSH keys.
This adds a customize option: virt-customize --ssh-inject USER[=KEY] virt-builder --ssh-inject USER[=KEY] virt-sysprep --ssh-inject USER[=KEY] In each case this either injects the current (host) user's ssh pubkey into the guest user USER (adding it to ~USER/.ssh/authorized_keys in the guest), or you can specify a particular key. For example: virt-builder fedora-20 --ssh-inject root
2015 Oct 06
0
[PATCH 5/5] mllib: Replace various ad hoc string_* functions with String.*
...rd.ml index f6d37cf..d683740 100644 --- a/customize/password.ml +++ b/customize/password.ml @@ -51,7 +51,7 @@ let password_crypto_of_string = function error (f_"password-crypto: unknown algorithm %s, use \"md5\", \"sha256\" or \"sha512\"") arg let rec parse_selector arg = - parse_selector_list arg (string_nsplit ":" arg) + parse_selector_list arg (String.nsplit ":" arg) and parse_selector_list orig_arg = function | [ "lock"|"locked" ] -> diff --git a/customize/ssh_key.ml b/customize/ssh_key.ml index dd6056f..a...
2014 Mar 18
2
[PATCH] customize: Move virt-customize-related code to a separate
There's not going to be an easy way to present this patch. It's huge and interconnected. Anyway, what it does is lay the groundwork for a new tool which I'm calling 'virt-customize'. virt-customize is virt-builder, but without the part where it downloads a template from a respository. Just the part where it customizes the template, that is, installing packages, editing
2015 Oct 06
10
[PATCH 0/5] mllib: Hide bad String functions and miscellaneous refactoring.
Hide/prevent the use of bad string functions like String.lowercase. These are replaced by safe functions that won't break UTF-8 strings. Other miscellaneous refactoring. Rich.
2016 Jul 07
12
[PATCH v3 0/8] v2v: Move Curl wrapper to mllib and more.
v2 -> v3: - Changes to the Curl API suggested by Pino.
2016 Jul 07
9
[PATCH v2 0/8] v2v: Move Curl wrapper to mllib and use it for virt-builder (and more).
v1 -> v2: - Fixed the bug with precedence of if / @. - Add some imperative list operators inspired by Perl, and use those for constructing the Curl arguments, and more. Rich.
2019 Oct 15
4
Splitting the large libguestfs repo
I got a little way into this. The two attached patches are preliminary work. My proposed split is: libguestfs.git common -> git submodule libguestfs-common.git generator/ lib/ all language bindings C based tools (eg. virt-df, virt-edit, guestfish) guestfs-tools.git common -> git submodule libguestfs-common.git
2017 Nov 21
2
[PATCH v3 0/2] common/mlstdutils: Extend the List module.
v2 -> v3: - Renamed List.assoc_ -> List.assoc_lbl. - Rebased on top of current master branch. Rich.
2016 Jun 27
0
Re: [PATCH] RFC: OCaml tools: add and use a Getopt module
...Arg.String (\n"; > + pr " [ \"--%s\" ],\n" name; > + pr " Getopt.String (\n"; > + pr " s_\"%s\",\n" v; > pr " fun s ->\n"; > pr " let sel = Password.parse_selector s in\n"; > pr " ops := %s sel :: !ops\n" discrim; > pr " ),\n"; > - pr " s_\"%s\" ^ \" \" ^ s_\"%s\"\n" v shortdesc; > + pr " s_\"%s\"\n" shortdesc; >...
2016 Jun 24
2
[PATCH] RFC: OCaml tools: add and use a Getopt module
...me; - pr " Arg.String (\n"; + pr " [ \"--%s\" ],\n" name; + pr " Getopt.String (\n"; + pr " s_\"%s\",\n" v; pr " fun s ->\n"; pr " let sel = Password.parse_selector s in\n"; pr " ops := %s sel :: !ops\n" discrim; pr " ),\n"; - pr " s_\"%s\" ^ \" \" ^ s_\"%s\"\n" v shortdesc; + pr " s_\"%s\"\n" shortdesc; pr " ),\n&...
2016 Jul 11
2
[PATCH v2] OCaml tools: add and use a Getopt module
...me; - pr " Arg.String (\n"; + pr " [ \"--%s\" ],\n" name; + pr " Getopt.String (\n"; + pr " s_\"%s\",\n" v; pr " fun s ->\n"; pr " let sel = Password.parse_selector s in\n"; pr " push_front (%s sel) ops\n" discrim; pr " ),\n"; - pr " s_\"%s\" ^ \" \" ^ s_\"%s\"\n" v shortdesc; + pr " s_\"%s\"\n" shortdesc; pr " ),\...
2016 Jul 13
3
[PATCH v3 1/2] OCaml tools: add and use a Getopt module
...me; - pr " Arg.String (\n"; + pr " [ \"--%s\" ],\n" name; + pr " Getopt.String (\n"; + pr " s_\"%s\",\n" v; pr " fun s ->\n"; pr " let sel = Password.parse_selector s in\n"; pr " push_front (%s sel) ops\n" discrim; pr " ),\n"; - pr " s_\"%s\" ^ \" \" ^ s_\"%s\"\n" v shortdesc; + pr " s_\"%s\"\n" shortdesc; pr " ),\...
2017 Oct 08
4
[PATCH 0/3] common/mlstdutils: Add Std_utils List and Option modules.
In Std_utils we already extend Char and String. These commits take it a little further by extending List and adding a new Option submodule. All basically simple refactoring. Rich.
2017 Oct 08
7
[[PATCH v2 0/4] common/mlstdutils: Add Std_utils List and Option modules.
This time including the first commit ...
2006 Feb 10
14
[PATCH] TC: bug fixes to the "sample" clause
....c --- iproute-20051007.keep/tc/f_u32.c 2005-01-19 08:11:58.000000000 +1000 +++ iproute-20051007/tc/f_u32.c 2006-01-12 17:12:43.000000000 +1000 @@ -878,6 +878,7 @@ struct tc_u32_sel sel; struct tc_u32_key keys[4]; } sel2; + memset(&sel2, 0, sizeof(sel2)); NEXT_ARG(); if (parse_selector(&argc, &argv, &sel2.sel, n)) { fprintf(stderr, "Illegal \"sample\"\n"); PATCH 2 ======= In tc, the u32 sample clause uses the 2.4 hashing algorithm. The hashing algorithm used by the kernel changed in 2.6, consequently "sample" hasn''t work...