mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
qemuDomainCreateDeviceRecursive: Report error if mkdir() fails
The virFileMakePathWithMode() which is our recursive version of mkdir() fails, it simply just returns a negative value with errno set. No error is reported (as compared to virFileTouch() for instance). Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Pavel Mores <pmores@redhat.com>
This commit is contained in:
parent
096e94cef6
commit
6bc746d66d
@ -14643,8 +14643,12 @@ qemuDomainCreateDeviceRecursive(const char *device,
|
||||
* proper owner and mode. Bind mount only after that. */
|
||||
} else if (isDir) {
|
||||
if (create &&
|
||||
virFileMakePathWithMode(devicePath, sb.st_mode) < 0)
|
||||
virFileMakePathWithMode(devicePath, sb.st_mode) < 0) {
|
||||
virReportSystemError(errno,
|
||||
_("Unable to make dir %s"),
|
||||
devicePath);
|
||||
goto cleanup;
|
||||
}
|
||||
} else {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
|
||||
_("unsupported device type %s 0%o"),
|
||||
|
Loading…
Reference in New Issue
Block a user