mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-25 15:02:45 +00:00
agent: mount: Remove unneeded mount_point local variable
We already have a `mount_path` local Path variable which holds the mount point. Use it instead of creating a new `mount_point` variable with identical type and content. Fixes: #3332 Signed-off-by: Dov Murik <dovmurik@linux.ibm.com>
This commit is contained in:
parent
ae271a7e7b
commit
91abebf92e
@ -449,18 +449,17 @@ fn mount_storage(logger: &Logger, storage: &Storage) -> Result<()> {
|
|||||||
let (flags, options) = parse_mount_flags_and_options(options_vec);
|
let (flags, options) = parse_mount_flags_and_options(options_vec);
|
||||||
|
|
||||||
let source = Path::new(&storage.source);
|
let source = Path::new(&storage.source);
|
||||||
let mount_point = Path::new(&storage.mount_point);
|
|
||||||
|
|
||||||
info!(logger, "mounting storage";
|
info!(logger, "mounting storage";
|
||||||
"mount-source" => source.display(),
|
"mount-source" => source.display(),
|
||||||
"mount-destination" => mount_point.display(),
|
"mount-destination" => mount_path.display(),
|
||||||
"mount-fstype" => storage.fstype.as_str(),
|
"mount-fstype" => storage.fstype.as_str(),
|
||||||
"mount-options" => options.as_str(),
|
"mount-options" => options.as_str(),
|
||||||
);
|
);
|
||||||
|
|
||||||
baremount(
|
baremount(
|
||||||
source,
|
source,
|
||||||
mount_point,
|
mount_path,
|
||||||
storage.fstype.as_str(),
|
storage.fstype.as_str(),
|
||||||
flags,
|
flags,
|
||||||
options.as_str(),
|
options.as_str(),
|
||||||
|
Loading…
Reference in New Issue
Block a user