search for: dest_filenam

Displaying 6 results from an estimated 6 matches for "dest_filenam".

Did you mean: dest_filename
2015 Jun 12
0
[PATCH 2/3] get-kernel: add --unversioned-names
...in + let unversioned = !unversioned in - add, output in + add, output, unversioned in (* Connect to libguestfs. *) let g = new G.guestfs () in @@ -161,19 +165,24 @@ read the man page virt-get-kernel(1). if kernels = [] then error (f_"no kernel found"); + let dest_filename fn = + let fn = Filename.basename fn in + if unversioned then fst (string_split "-" fn) + else fn in + (* Download the latest. *) let outputdir = match output with | None -> Filename.current_dir_name | Some dir -> dir in let kernel_in = List.hd kern...
2015 Sep 01
3
[PATCH 1/3] get-kernel: split command line handling in own function
Simple refactoring, no actual behaviour changes. --- get-kernel/get_kernel.ml | 188 ++++++++++++++++++++++++----------------------- 1 file changed, 95 insertions(+), 93 deletions(-) diff --git a/get-kernel/get_kernel.ml b/get-kernel/get_kernel.ml index 8ca7ca0..3b27740 100644 --- a/get-kernel/get_kernel.ml +++ b/get-kernel/get_kernel.ml @@ -23,104 +23,106 @@ module G = Guestfs open Printf
2015 Jun 11
2
[PATCH] (Almost) new tool: virt-get-kernel
Extract the guest kernel/ramdisk extraction from virt-builder into a separate utility, so it can be used and improved without cluttering virt-builder. Currently it does what virt-builder --get-kernel did, adding also the options for remote disks and libvirt access, much like other libguestfs tools. virt-builder --get-kernel now just spawns virt-get-kernel. --- .gitignore |
2015 Jun 12
1
[PATCH 3/3] get-kernel: add --prefix
...str -> Some str in let unversioned = !unversioned in + let prefix = !prefix in - add, output, unversioned in + add, output, unversioned, prefix in (* Connect to libguestfs. *) let g = new G.guestfs () in @@ -167,8 +174,12 @@ read the man page virt-get-kernel(1). let dest_filename fn = let fn = Filename.basename fn in - if unversioned then fst (string_split "-" fn) - else fn in + let fn = + if unversioned then fst (string_split "-" fn) + else fn in + match prefix with + | None -> fn + | Some p -> p ^ "-" ^...
2015 Oct 06
0
[PATCH 5/5] mllib: Replace various ad hoc string_* functions with String.*
...for commands not allowed in files containing commands. *) List.iter ( fun (cmd, _) -> diff --git a/get-kernel/get_kernel.ml b/get-kernel/get_kernel.ml index 8786bf3..2bea559 100644 --- a/get-kernel/get_kernel.ml +++ b/get-kernel/get_kernel.ml @@ -198,7 +198,7 @@ let main () = let dest_filename fn = let fn = Filename.basename fn in let fn = - if unversioned then fst (string_split "-" fn) + if unversioned then fst (String.split "-" fn) else fn in match prefix with | None -> fn diff --git a/mllib/common_utils.ml b/mllib/common_uti...
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.