endif
endif
- if fs_enable
- mount_prog = find_program('mount', required: get_option('storage_fs'), dirs: libvirt_sbin_path)
- umount_prog = find_program('umount', required: get_option('storage_fs'), dirs: libvirt_sbin_path)
- mkfs_prog = find_program('mkfs', required: get_option('storage_fs'), dirs: libvirt_sbin_path)
-
- if not mount_prog.found() or not umount_prog.found() or not mkfs_prog.found()
- fs_enable = false
- endif
- endif
-
if fs_enable
use_storage = true
conf.set('WITH_STORAGE_FS', 1)
- conf.set_quoted('MOUNT', mount_prog.full_path())
- conf.set_quoted('UMOUNT', umount_prog.full_path())
- conf.set_quoted('MKFS', mkfs_prog.full_path())
endif
endif
if (!(src = virStorageBackendFileSystemGetPoolSource(pool)))
return -1;
- cmd = virStorageBackendFileSystemMountCmd(MOUNT, def, src);
+ cmd = virStorageBackendFileSystemMountCmd("mount", def, src);
/* Mounting a shared FS might take a long time. Don't hold
* the pool locked meanwhile. */
if ((rc = virStorageBackendFileSystemIsMounted(pool)) != 1)
return rc;
- cmd = virCommandNewArgList(UMOUNT, def->target.path, NULL);
+ cmd = virCommandNewArgList("umount", def->target.path, NULL);
return virCommandRun(cmd, NULL);
}
#endif /* WITH_STORAGE_FS */
g_autoptr(virCommand) cmd = NULL;
g_autofree char *mkfs = NULL;
-#if WITH_STORAGE_FS
- mkfs = virFindFileInPath(MKFS);
-#endif /* WITH_STORAGE_FS */
-
- if (!mkfs) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("mkfs is not available on this platform: Failed to make filesystem of type '%1$s' on device '%2$s'"),
- format, device);
- return -1;
- }
-
- cmd = virCommandNewArgList(mkfs, "-t", format, NULL);
+ cmd = virCommandNewArgList("mkfs", "-t", format, NULL);
/* use the force, otherwise mkfs.xfs won't overwrite existing fs.
* Similarly mkfs.ext2, mkfs.ext3, and mkfs.ext4 require supplying -F