search for: discover_modpath

Displaying 7 results from an estimated 7 matches for "discover_modpath".

Did you mean: _discover_modpath
2016 Jul 01
0
[PATCH 1/2] v2v: fix and implify the internal Convert_linux:discover_modpath
...file changed, 10 insertions(+), 20 deletions(-) diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml index cadfbb5..0296844 100644 --- a/v2v/convert_linux.ml +++ b/v2v/convert_linux.ml @@ -1219,28 +1219,18 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source rcaps = and discover_modpath () = (* Find what /etc/modprobe.conf is called today. *) - let modpath = ref "" in - - (* Note that we're checking in ascending order of preference so - * that the last discovered method will be chosen. - *) - List.iter ( - fun file -> - if g#is_fi...
2016 Jul 01
4
[PATCH 0/2] v2v: fix setting custom modprobe options
Hi, due to a broken discover_modpath function, and to a wrong block for a match statement, the modprobe options for virtio/SCSI blocks where not written at all. This series provides a small refactor, and the fixes. Thanks, -- Pino Toscano (2): v2v: fix and implify the internal Convert_linux:discover_modpath v2v: fix priority o...
2016 Sep 09
1
[PATCH 1/2] v2v: linux: Avoid recursive functions.
...f/alias"; + "/files/etc/modprobe.d/*/alias"; + ] in + let paths = + List.map ( + fun p -> + let p = sprintf "%s[%s]" p query in + Array.to_list (g#aug_match p) + ) paths in + List.flatten paths + + and discover_modpath () = + (* Find what /etc/modprobe.conf is called today. *) + if g#is_dir ~followsymlinks:true "/etc/modprobe.d" then ( + (* Create a new file /etc/modprobe.d/virt-v2v-added.conf. *) + "/etc/modprobe.d/virt-v2v-added.conf" + ) else ( + (* List...
2016 Apr 12
3
[PATCH] v2v: add support for virtio-scsi
...(List.rev paths_to_delete); - g#aug_set (path ^ "/modulename") "virtio_blk" + g#aug_set (path ^ "/modulename") + (string_of_block_type block_type) ) else ( (* We have to add a scsi_hostadapter. *) let modpath = discover_modpath () in g#aug_set (sprintf "/files%s/alias[last()+1]" modpath) "scsi_hostadapter"; g#aug_set (sprintf "/files%s/alias[last()]/modulename" modpath) - "virtio_blk" + (string_of_block_type block_type) )...
2016 Apr 14
0
[PATCH v2] v2v: add support for virtio-scsi
...-> ignore (g#aug_rm path)) (List.rev paths_to_delete); - g#aug_set (path ^ "/modulename") "virtio_blk" + g#aug_set (path ^ "/modulename") block_module ) else ( (* We have to add a scsi_hostadapter. *) let modpath = discover_modpath () in g#aug_set (sprintf "/files%s/alias[last()+1]" modpath) "scsi_hostadapter"; g#aug_set (sprintf "/files%s/alias[last()]/modulename" modpath) - "virtio_blk" + block_module ) | IDE -> (* T...
2016 Apr 14
1
[PATCH v4] v2v: add support for virtio-scsi
...-> ignore (g#aug_rm path)) (List.rev paths_to_delete); - g#aug_set (path ^ "/modulename") "virtio_blk" + g#aug_set (path ^ "/modulename") block_module ) else ( (* We have to add a scsi_hostadapter. *) let modpath = discover_modpath () in g#aug_set (sprintf "/files%s/alias[last()+1]" modpath) "scsi_hostadapter"; g#aug_set (sprintf "/files%s/alias[last()]/modulename" modpath) - "virtio_blk" + block_module ) | IDE -> (* T...
2016 Apr 14
1
[PATCH v3] v2v: add support for virtio-scsi
...-> ignore (g#aug_rm path)) (List.rev paths_to_delete); - g#aug_set (path ^ "/modulename") "virtio_blk" + g#aug_set (path ^ "/modulename") block_module ) else ( (* We have to add a scsi_hostadapter. *) let modpath = discover_modpath () in g#aug_set (sprintf "/files%s/alias[last()+1]" modpath) "scsi_hostadapter"; g#aug_set (sprintf "/files%s/alias[last()]/modulename" modpath) - "virtio_blk" + block_module ) | IDE -> (* T...