提交 296a5331 编写于 作者: P Peter Krempa

util: storage: Make @backingFormat optional in virStorageFileGetMetadataInternal

Some callers don't need to know the backing format. Make the argument
optional by using a dummy int if NULL is passed.
上级 e20853e1
......@@ -966,9 +966,13 @@ virStorageFileGetMetadataInternal(virStorageSourcePtr meta,
size_t len,
int *backingFormat)
{
int dummy;
int ret = -1;
size_t i;
if (!backingFormat)
backingFormat = &dummy;
VIR_DEBUG("path=%s, buf=%p, len=%zu, meta->format=%d",
meta->path, buf, len, meta->format);
......
......@@ -293,7 +293,7 @@ int virStorageFileGetMetadataInternal(virStorageSourcePtr meta,
char *buf,
size_t len,
int *backingFormat)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4);
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
virStorageSourcePtr virStorageFileGetMetadataFromFD(const char *path,
int fd,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册