mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
mllib: Add quote function to Common_utils module.
Remove multiple places where we let quote = Filename.quote
This commit is contained in:
@@ -30,8 +30,6 @@ and revision =
|
||||
| Rev_int of int
|
||||
| Rev_string of string
|
||||
|
||||
let quote = Filename.quote
|
||||
|
||||
let string_of_revision = function
|
||||
| Rev_int n -> string_of_int n
|
||||
| Rev_string s -> s
|
||||
|
||||
@@ -21,5 +21,3 @@
|
||||
open Printf
|
||||
|
||||
open Common_utils
|
||||
|
||||
let quote = Filename.quote
|
||||
|
||||
@@ -21,8 +21,6 @@ open Common_utils
|
||||
|
||||
open Printf
|
||||
|
||||
let quote = Filename.quote
|
||||
|
||||
let unit_GB howmany =
|
||||
(Int64.of_int howmany) *^ 1024_L *^ 1024_L *^ 1024_L
|
||||
|
||||
|
||||
@@ -234,6 +234,7 @@ module String = struct
|
||||
end
|
||||
|
||||
let (//) = Filename.concat
|
||||
let quote = Filename.quote
|
||||
|
||||
let ( +^ ) = Int64.add
|
||||
let ( -^ ) = Int64.sub
|
||||
|
||||
@@ -113,6 +113,9 @@ end
|
||||
val ( // ) : string -> string -> string
|
||||
(** Concatenate directory and filename. *)
|
||||
|
||||
val quote : string -> string
|
||||
(** Shell-safe quoting of a string (alias for {!Filename.quote}). *)
|
||||
|
||||
val ( +^ ) : int64 -> int64 -> int64
|
||||
val ( -^ ) : int64 -> int64 -> int64
|
||||
val ( *^ ) : int64 -> int64 -> int64
|
||||
|
||||
@@ -20,8 +20,6 @@ open Printf
|
||||
|
||||
open Common_utils
|
||||
|
||||
let quote = Filename.quote
|
||||
|
||||
type t = {
|
||||
curl : string;
|
||||
args : args;
|
||||
|
||||
@@ -24,8 +24,6 @@ open Common_utils
|
||||
|
||||
module G = Guestfs
|
||||
|
||||
let quote = Filename.quote
|
||||
|
||||
(* Return true if the filesystem is a read-only LV (RHBZ#1185561). *)
|
||||
let is_read_only_lv (g : G.guestfs) =
|
||||
let lvs = Array.to_list (g#lvs_full ()) in
|
||||
|
||||
@@ -64,8 +64,6 @@ let default_plan = {
|
||||
|
||||
let failwithf fs = ksprintf failwith fs
|
||||
|
||||
let quote = Filename.quote
|
||||
|
||||
let run ~test ?input_disk ?input_xml ?(test_plan = default_plan) () =
|
||||
let input_disk =
|
||||
match input_disk with
|
||||
|
||||
@@ -23,8 +23,6 @@ open Printf
|
||||
open Common_gettext.Gettext
|
||||
open Common_utils
|
||||
|
||||
let quote = Filename.quote
|
||||
|
||||
external drive_name : int -> string = "v2v_utils_drive_name"
|
||||
external drive_index : string -> int = "v2v_utils_drive_index"
|
||||
|
||||
|
||||
@@ -18,9 +18,6 @@
|
||||
|
||||
(** Utilities used in virt-v2v only. *)
|
||||
|
||||
val quote : string -> string
|
||||
(** The {!Filename.quote} function. *)
|
||||
|
||||
val drive_name : int -> string
|
||||
val drive_index : string -> int
|
||||
|
||||
|
||||
Reference in New Issue
Block a user