Skip to content

Commit 16104c7

Browse files
committed
refactor: remove work_dir argument from create_hd
1 parent b5ad75f commit 16104c7

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

vmm/src/app/qemu.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ pub struct State {
7070
fn create_hd(
7171
image_file: impl AsRef<Path>,
7272
backing_file: Option<impl AsRef<Path>>,
73-
size: &str,
74-
work_dir: Option<impl AsRef<Path>>,
73+
size: &str
7574
) -> Result<()> {
7675
let mut command = Command::new("qemu-img");
7776
command.arg("create").arg("-f").arg("qcow2");
@@ -83,11 +82,6 @@ fn create_hd(
8382
}
8483
command.arg(image_file.as_ref());
8584
command.arg(size);
86-
87-
// Set working directory if provided
88-
if let Some(work_dir) = work_dir {
89-
command.current_dir(work_dir.as_ref());
90-
}
9185
let output = command.output()?;
9286
if !output.status.success() {
9387
bail!(
@@ -350,8 +344,7 @@ impl VmConfig {
350344
create_hd(
351345
&hda_path,
352346
self.image.hda.as_ref(),
353-
&disk_size,
354-
Some(&workdir),
347+
&disk_size
355348
)?;
356349
}
357350
if !cfg.user.is_empty() {

0 commit comments

Comments
 (0)