Skip to content

Commit

Permalink
common: Adapt to renamed function On_exit.rmdir -> On_exit.rm_rf
Browse files Browse the repository at this point in the history
This function was renamed to make it clearer what it does (and that
it's potentially dangerous).  The functionality is unchanged.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
  • Loading branch information
rwmjones committed Jul 15, 2022
1 parent af4a045 commit 2eb6441
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion common
2 changes: 1 addition & 1 deletion input/OVA.ml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ let rec parse_ova ova =
else (
let tmpdir =
let t = Mkdtemp.temp_dir ~base_dir:large_tmpdir "ova." in
On_exit.rmdir t;
On_exit.rm_rf t;
t in

match detect_file_type ova with
Expand Down
2 changes: 1 addition & 1 deletion input/parse_domain_from_vmx.ml
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ and find_nics vmx =
let parse_domain_from_vmx vmx_source =
let tmpdir =
let t = Mkdtemp.temp_dir "vmx." in
On_exit.rmdir t;
On_exit.rm_rf t;
t in

(* If the transport is SSH, fetch the file from remote, else
Expand Down
2 changes: 1 addition & 1 deletion lib/nbdkit.ml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ let add_filter_if_available cmd filter =
let run_unix socket cmd =
(* Create a temporary directory where we place the PID file. *)
let piddir = Mkdtemp.temp_dir "v2vnbdkit." in
On_exit.rmdir piddir;
On_exit.rm_rf piddir;

let id = unique () in
let pidfile = piddir // sprintf "nbdkit%d.pid" id in
Expand Down
2 changes: 1 addition & 1 deletion lib/qemuNBD.ml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ let run_unix socket { disk; snapshot; format; imgopts } =

(* Create a temporary directory where we place the PID file. *)
let piddir = Mkdtemp.temp_dir "v2vqemunbd." in
On_exit.rmdir piddir;
On_exit.rm_rf piddir;

let id = unique () in
let pidfile = piddir // sprintf "qemunbd%d.pid" id in
Expand Down
2 changes: 1 addition & 1 deletion lib/utils.ml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ let error_if_no_ssh_agent () =
let create_v2v_directory () =
let d = Mkdtemp.temp_dir "v2v." in
chown_for_libvirt_rhbz_1045069 d;
On_exit.rmdir d;
On_exit.rm_rf d;
d

(* Wait for a file to appear until a timeout. *)
Expand Down
2 changes: 1 addition & 1 deletion output/python_script.ml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type script = {

let create ?(name = "script.py") code =
let tmpdir = Mkdtemp.temp_dir "v2v." in
On_exit.rmdir tmpdir;
On_exit.rm_rf tmpdir;
let path = tmpdir // name in
with_open_out path (fun chan -> output_string chan code);
{ tmpdir; path }
Expand Down

0 comments on commit 2eb6441

Please sign in to comment.