mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
build: storage: Macro 'MKFS' is undefined on some platforms.
Mac OS X 10.6. Snow Leopard and probably other do not provide a mkfs command to create filesystems. Macro MKFS then remained undefined and did not provide any substitute, so that build failed on a missing argument.
This commit is contained in:
parent
1ce3b61fa5
commit
bc35f12a45
@ -625,6 +625,8 @@ virStorageBackendFileSystemProbe(const char *device ATTRIBUTE_UNUSED,
|
|||||||
|
|
||||||
#endif /* #if HAVE_LIBBLKID */
|
#endif /* #if HAVE_LIBBLKID */
|
||||||
|
|
||||||
|
/* some platforms don't support mkfs */
|
||||||
|
#ifdef MKFS
|
||||||
static int
|
static int
|
||||||
virStorageBackendExecuteMKFS(const char *device,
|
virStorageBackendExecuteMKFS(const char *device,
|
||||||
const char *format)
|
const char *format)
|
||||||
@ -647,6 +649,19 @@ virStorageBackendExecuteMKFS(const char *device,
|
|||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#else /* #ifdef MKFS */
|
||||||
|
static int
|
||||||
|
virStorageBackendExecuteMKFS(const char *device ATTRIBUTE_UNUSED,
|
||||||
|
const char *format ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
virStorageReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
|
_("mkfs is not supported on this platform: "
|
||||||
|
"Failed to make filesystem of "
|
||||||
|
"type '%s' on device '%s'"),
|
||||||
|
format, device);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
#endif /* #ifdef MKFS */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
virStorageBackendMakeFileSystem(virStoragePoolObjPtr pool,
|
virStorageBackendMakeFileSystem(virStoragePoolObjPtr pool,
|
||||||
|
Loading…
Reference in New Issue
Block a user