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>
* 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"),