Displaying 14 results from an estimated 14 matches for "quote_args".
2016 May 23
0
[PATCH 4/5] mllib: move stringify_args from dib
....ml b/dib/dib.ml
index b988f14..a76eb5e 100644
--- a/dib/dib.ml
+++ b/dib/dib.ml
@@ -53,16 +53,6 @@ let read_dib_envvars () =
let vars = List.map (fun x -> x ^ "\n") vars in
String.concat "" vars
-let make_dib_args args =
- let args = Array.to_list args in
- let rec quote_args = function
- | [] -> ""
- | x :: xs -> " " ^ (quote x) ^ quote_args xs
- in
- match args with
- | [] -> ""
- | app :: xs -> app ^ quote_args xs
-
let write_script fn text =
let oc = open_out fn in
output_string oc text;
@@ -507,7 +497,7 @@...
2009 Oct 21
1
Limiting remote operations to a particular directory, and not above ?
I am tasked with pointing rsync transfers to valuable, live systems.
The requirements include that this rsync job be run as root (rsync over ssh to the destination, as root) and that the --delete option be used.
The last piece is, the _remote_ destinations are not fixed - they are generated from a database and fed into my rsync script.
So, of course the worry is that one of these destination
2016 May 23
7
[PATCH 1/5] mllib: make external_command echo the command executed
Add an optional parameter to disable this behaviour, so the Curl module
in v2v won't print user-sensible data (like passwords).
---
builder/checksums.ml | 1 -
builder/downloader.ml | 1 -
builder/sigchecker.ml | 1 -
mllib/common_utils.ml | 4 +++-
mllib/common_utils.mli | 7 +++++--
v2v/curl.ml | 2 +-
6 files changed, 9 insertions(+), 7 deletions(-)
diff --git
2017 Jun 15
0
[PATCH v6 04/41] mllib: Split ‘Common_utils’ into ‘Std_utils’ + ‘Common_utils’.
...aracters *)
+ else if uuid2.[i2] = '-' then loop i1 (i2+1)
+ else (
+ let c = compare uuid1.[i1] uuid2.[i2] in
+ if c <> 0 then c (* not matching *)
+ else loop (i1+1) (i2+1)
+ )
+ in
+ loop 0 0
+
+let stringify_args args =
+ let rec quote_args = function
+ | [] -> ""
+ | x :: xs -> " " ^ Filename.quote x ^ quote_args xs
+ in
+ match args with
+ | [] -> ""
+ | app :: xs -> app ^ quote_args xs
+
+(* Unlink a temporary file on exit. *)
+let unlink_on_exit =
+ let files = ref [] in
+ let...
2015 May 29
0
[PATCH v3] RFC: New virt-dib tool
...ars = Array.to_list (Unix.environment ()) in
+ let vars = List.filter (fun x -> string_prefix x "DIB_") vars in
+ let vars = List.map (fun x -> x ^ "\n") vars in
+ String.concat "" vars
+
+let make_dib_args args =
+ let args = Array.to_list args in
+ let rec quote_args = function
+ | [] -> ""
+ | x :: xs -> " " ^ (quote x) ^ quote_args xs
+ in
+ match args with
+ | [] -> ""
+ | app :: xs -> app ^ quote_args xs
+
+let write_script fn text =
+ let oc = open_out fn in
+ output_string oc text;
+ flush oc;
+ clos...
2015 Jul 03
1
[PATCH v5] New tool: virt-dib
...ars = Array.to_list (Unix.environment ()) in
+ let vars = List.filter (fun x -> string_prefix x "DIB_") vars in
+ let vars = List.map (fun x -> x ^ "\n") vars in
+ String.concat "" vars
+
+let make_dib_args args =
+ let args = Array.to_list args in
+ let rec quote_args = function
+ | [] -> ""
+ | x :: xs -> " " ^ (quote x) ^ quote_args xs
+ in
+ match args with
+ | [] -> ""
+ | app :: xs -> app ^ quote_args xs
+
+let write_script fn text =
+ let oc = open_out fn in
+ output_string oc text;
+ flush oc;
+ clos...
2015 Mar 31
0
[PATCH] WIP: New virt-dib tool
...dib_envvars () =
+ let vars = Array.to_list (environment ()) in
+ let vars = List.filter (fun x -> string_prefix x "DIB_") vars in
+ List.fold_left (fun acc x -> acc ^ x ^ "\n") "" vars
+
+let make_dib_args args =
+ let args = Array.to_list args in
+ let rec quote_args = function
+ | [] -> ""
+ | x :: xs -> sprintf " %s" (quote x) ^ quote_args xs
+ in
+ match args with
+ | [] -> ""
+ | app :: xs -> app ^ quote_args xs
+
+let write_script fn text =
+ let oc = open_out fn in
+ output_string oc text;
+ flush oc;...
2015 Jun 16
2
[PATCH v4] RFC: New tool: virt-dib
...ars = Array.to_list (Unix.environment ()) in
+ let vars = List.filter (fun x -> string_prefix x "DIB_") vars in
+ let vars = List.map (fun x -> x ^ "\n") vars in
+ String.concat "" vars
+
+let make_dib_args args =
+ let args = Array.to_list args in
+ let rec quote_args = function
+ | [] -> ""
+ | x :: xs -> " " ^ (quote x) ^ quote_args xs
+ in
+ match args with
+ | [] -> ""
+ | app :: xs -> app ^ quote_args xs
+
+let write_script fn text =
+ let oc = open_out fn in
+ output_string oc text;
+ flush oc;
+ clos...
2017 Jun 19
16
[PATCH v7 00/13] Refactor utilities
This is just the utilities part of the patch series from:
https://www.redhat.com/archives/libguestfs/2017-June/msg00103.html
I believe this addresses everything raised in comments on that
patch series.
Rich.
2017 Jun 09
12
[PATCH 00/12] Refactor utility functions.
This turned out to be rather more involved than I thought.
We have lots of utility functions, spread all over the repository,
with not a lot of structure. This moves many of them under common/
and structures them so there are clear dependencies.
This doesn't complete the job by any means. Other items I had on my
to-do list for this change were:
- Split up mllib/common_utils into:
-
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
...b>*)
+
(* Compare two version strings intelligently. *)
let rex_numbers = Str.regexp "^\\([0-9]+\\)\\(.*\\)$"
let rex_letters = Str.regexp_case_fold "^\\([a-z]+\\)\\(.*\\)$"
@@ -684,6 +772,8 @@ let stringify_args args =
| [] -> ""
| app :: xs -> app ^ quote_args xs
+(*</stdlib>*)
+
(* Run an external command, slurp up the output as a list of lines. *)
let external_command ?(echo_cmd = true) cmd =
if echo_cmd then
@@ -748,6 +838,8 @@ let uuidgen () =
if len < 10 then assert false; (* sanity check on uuidgen *)
uuid
+(*<stdlib>*...
2017 Jun 12
32
[PATCH v5 00/32] Refactor utilities, implement some APIs in OCaml.
This is a combination of:
https://www.redhat.com/archives/libguestfs/2017-June/msg00046.html
[PATCH 00/12] Refactor utility functions.
plus:
https://www.redhat.com/archives/libguestfs/2017-June/msg00023.html
[PATCH v3 00/19] Allow APIs to be implemented in OCaml.
with the second patches rebased on top of the utility refactoring, and
some other adjustments and extensions.
This passes
2017 Jun 15
45
[PATCH v6 00/41] Refactor utilities, reimplement inspection in the daemon.
v5:
https://www.redhat.com/archives/libguestfs/2017-June/msg00065.html
Since v5, this now implements inspection almost completely for Linux
and Windows guests.
Rich.
2017 Jun 21
45
[PATCH v8 00/42] Refactor utilities and reimplement inspection.
v7 was:
https://www.redhat.com/archives/libguestfs/2017-June/msg00169.html
https://www.redhat.com/archives/libguestfs/2017-June/msg00184.html
I believe this addresses all comments received so far.
Also it now passes a test where I compared about 100 disk images
processed with old and new virt-inspector binaries. The output is
identical in all cases except one which is caused by a bug in blkid