提交 2bdcbb4e 编写于 作者: M Michal Privoznik

vz_storage: Reformat

Honour our formatting style. Adjust indentation so it matches the
rest of our code.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 dc1b0345
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
static virStorageVolDefPtr static virStorageVolDefPtr
vzStorageVolDefineXML(virStoragePoolObjPtr pool, const char *xmldesc, vzStorageVolDefineXML(virStoragePoolObjPtr pool, const char *xmldesc,
const char *xmlfile, bool is_new); const char *xmlfile, bool is_new);
static virStorageVolPtr static virStorageVolPtr
vzStorageVolLookupByPath(virConnectPtr conn, const char *path); vzStorageVolLookupByPath(virConnectPtr conn, const char *path);
...@@ -245,8 +245,8 @@ vzPoolAddByDomain(virConnectPtr conn, virDomainObjPtr dom) ...@@ -245,8 +245,8 @@ vzPoolAddByDomain(virConnectPtr conn, virDomainObjPtr dom)
} }
static int vzDiskDescParseNode(xmlDocPtr xml, static int vzDiskDescParseNode(xmlDocPtr xml,
xmlNodePtr root, xmlNodePtr root,
virStorageVolDefPtr def) virStorageVolDefPtr def)
{ {
xmlXPathContextPtr ctxt = NULL; xmlXPathContextPtr ctxt = NULL;
int ret = -1; int ret = -1;
...@@ -296,10 +296,10 @@ static int vzDiskDescParse(const char *path, virStorageVolDefPtr def) ...@@ -296,10 +296,10 @@ static int vzDiskDescParse(const char *path, virStorageVolDefPtr def)
} }
static int vzAddDiskVolume(virStoragePoolObjPtr pool, static int vzAddDiskVolume(virStoragePoolObjPtr pool,
virDomainObjPtr dom, virDomainObjPtr dom,
const char *diskName, const char *diskName,
const char *diskPath, const char *diskPath,
const char *diskDescPath) const char *diskDescPath)
{ {
virStorageVolDefPtr def = NULL; virStorageVolDefPtr def = NULL;
...@@ -332,7 +332,7 @@ static int vzAddDiskVolume(virStoragePoolObjPtr pool, ...@@ -332,7 +332,7 @@ static int vzAddDiskVolume(virStoragePoolObjPtr pool,
} }
static int vzFindVmVolumes(virStoragePoolObjPtr pool, static int vzFindVmVolumes(virStoragePoolObjPtr pool,
virDomainObjPtr dom) virDomainObjPtr dom)
{ {
vzDomObjPtr pdom = dom->privateData; vzDomObjPtr pdom = dom->privateData;
DIR *dir; DIR *dir;
...@@ -376,7 +376,7 @@ static int vzFindVmVolumes(virStoragePoolObjPtr pool, ...@@ -376,7 +376,7 @@ static int vzFindVmVolumes(virStoragePoolObjPtr pool,
/* here we know, that ent->d_name is a disk image directory */ /* here we know, that ent->d_name is a disk image directory */
if (vzAddDiskVolume(pool, dom, ent->d_name, if (vzAddDiskVolume(pool, dom, ent->d_name,
diskPath, diskDescPath)) diskPath, diskDescPath))
goto cleanup; goto cleanup;
} }
if (direrr < 0) if (direrr < 0)
...@@ -393,7 +393,7 @@ static int vzFindVmVolumes(virStoragePoolObjPtr pool, ...@@ -393,7 +393,7 @@ static int vzFindVmVolumes(virStoragePoolObjPtr pool,
static int static int
vzPoolsAdd(virDomainObjPtr dom, vzPoolsAdd(virDomainObjPtr dom,
void *opaque) void *opaque)
{ {
virConnectPtr conn = opaque; virConnectPtr conn = opaque;
virStoragePoolObjPtr pool; virStoragePoolObjPtr pool;
...@@ -464,7 +464,7 @@ static int vzLoadPools(virConnectPtr conn) ...@@ -464,7 +464,7 @@ static int vzLoadPools(virConnectPtr conn)
virDrvOpenStatus virDrvOpenStatus
vzStorageOpen(virConnectPtr conn, vzStorageOpen(virConnectPtr conn,
unsigned int flags) unsigned int flags)
{ {
vzConnPtr privconn = conn->privateData; vzConnPtr privconn = conn->privateData;
virStorageDriverStatePtr storageState; virStorageDriverStatePtr storageState;
...@@ -564,7 +564,7 @@ vzConnectNumOfDefinedStoragePools(virConnectPtr conn) ...@@ -564,7 +564,7 @@ vzConnectNumOfDefinedStoragePools(virConnectPtr conn)
static int static int
vzConnectListDefinedStoragePools(virConnectPtr conn, vzConnectListDefinedStoragePools(virConnectPtr conn,
char **const names, int nnames) char **const names, int nnames)
{ {
vzConnPtr privconn = conn->privateData; vzConnPtr privconn = conn->privateData;
int n = 0; int n = 0;
...@@ -704,7 +704,7 @@ vzStoragePoolGetAlloc(virStoragePoolDefPtr def) ...@@ -704,7 +704,7 @@ vzStoragePoolGetAlloc(virStoragePoolDefPtr def)
static virStoragePoolPtr static virStoragePoolPtr
vzStoragePoolDefineXML(virConnectPtr conn, vzStoragePoolDefineXML(virConnectPtr conn,
const char *xml, unsigned int flags) const char *xml, unsigned int flags)
{ {
vzConnPtr privconn = conn->privateData; vzConnPtr privconn = conn->privateData;
virStoragePoolDefPtr def; virStoragePoolDefPtr def;
...@@ -1040,7 +1040,7 @@ vzStoragePoolNumOfVolumes(virStoragePoolPtr pool) ...@@ -1040,7 +1040,7 @@ vzStoragePoolNumOfVolumes(virStoragePoolPtr pool)
static int static int
vzStoragePoolListVolumes(virStoragePoolPtr pool, vzStoragePoolListVolumes(virStoragePoolPtr pool,
char **const names, int maxnames) char **const names, int maxnames)
{ {
vzConnPtr privconn = pool->conn->privateData; vzConnPtr privconn = pool->conn->privateData;
virStoragePoolObjPtr privpool; virStoragePoolObjPtr privpool;
...@@ -1061,7 +1061,7 @@ vzStoragePoolListVolumes(virStoragePoolPtr pool, ...@@ -1061,7 +1061,7 @@ vzStoragePoolListVolumes(virStoragePoolPtr pool,
if (!virStoragePoolObjIsActive(privpool)) { if (!virStoragePoolObjIsActive(privpool)) {
virReportError(VIR_ERR_OPERATION_INVALID, virReportError(VIR_ERR_OPERATION_INVALID,
_("storage pool '%s' is not active"), pool->name); _("storage pool '%s' is not active"), pool->name);
goto error; goto error;
} }
...@@ -1084,7 +1084,7 @@ vzStoragePoolListVolumes(virStoragePoolPtr pool, ...@@ -1084,7 +1084,7 @@ vzStoragePoolListVolumes(virStoragePoolPtr pool,
static virStorageVolPtr static virStorageVolPtr
vzStorageVolLookupByName(virStoragePoolPtr pool, vzStorageVolLookupByName(virStoragePoolPtr pool,
const char *name) const char *name)
{ {
vzConnPtr privconn = pool->conn->privateData; vzConnPtr privconn = pool->conn->privateData;
virStoragePoolObjPtr privpool; virStoragePoolObjPtr privpool;
...@@ -1207,8 +1207,8 @@ vzStorageVolLookupByPath(virConnectPtr conn, const char *path) ...@@ -1207,8 +1207,8 @@ vzStorageVolLookupByPath(virConnectPtr conn, const char *path)
static virStorageVolDefPtr static virStorageVolDefPtr
vzStorageVolDefineXML(virStoragePoolObjPtr pool, vzStorageVolDefineXML(virStoragePoolObjPtr pool,
const char *xmldesc, const char *xmldesc,
const char *xmlfile, bool is_new) const char *xmlfile, bool is_new)
{ {
virStorageVolDefPtr privvol = NULL; virStorageVolDefPtr privvol = NULL;
virStorageVolDefPtr ret = NULL; virStorageVolDefPtr ret = NULL;
...@@ -1277,7 +1277,7 @@ vzStorageVolDefineXML(virStoragePoolObjPtr pool, ...@@ -1277,7 +1277,7 @@ vzStorageVolDefineXML(virStoragePoolObjPtr pool,
static virStorageVolPtr static virStorageVolPtr
vzStorageVolCreateXML(virStoragePoolPtr pool, vzStorageVolCreateXML(virStoragePoolPtr pool,
const char *xmldesc, unsigned int flags) const char *xmldesc, unsigned int flags)
{ {
vzConnPtr privconn = pool->conn->privateData; vzConnPtr privconn = pool->conn->privateData;
virStoragePoolObjPtr privpool; virStoragePoolObjPtr privpool;
...@@ -1316,9 +1316,9 @@ vzStorageVolCreateXML(virStoragePoolPtr pool, ...@@ -1316,9 +1316,9 @@ vzStorageVolCreateXML(virStoragePoolPtr pool,
static virStorageVolPtr static virStorageVolPtr
vzStorageVolCreateXMLFrom(virStoragePoolPtr pool, vzStorageVolCreateXMLFrom(virStoragePoolPtr pool,
const char *xmldesc, const char *xmldesc,
virStorageVolPtr clonevol, virStorageVolPtr clonevol,
unsigned int flags) unsigned int flags)
{ {
vzConnPtr privconn = pool->conn->privateData; vzConnPtr privconn = pool->conn->privateData;
virStoragePoolObjPtr privpool; virStoragePoolObjPtr privpool;
...@@ -1399,7 +1399,7 @@ vzStorageVolCreateXMLFrom(virStoragePoolPtr pool, ...@@ -1399,7 +1399,7 @@ vzStorageVolCreateXMLFrom(virStoragePoolPtr pool,
} }
int vzStorageVolDefRemove(virStoragePoolObjPtr privpool, int vzStorageVolDefRemove(virStoragePoolObjPtr privpool,
virStorageVolDefPtr privvol) virStorageVolDefPtr privvol)
{ {
int ret = -1; int ret = -1;
char *xml_path = NULL; char *xml_path = NULL;
...@@ -1486,12 +1486,12 @@ vzStorageVolTypeForPool(int pooltype) ...@@ -1486,12 +1486,12 @@ vzStorageVolTypeForPool(int pooltype)
{ {
switch (pooltype) { switch (pooltype) {
case VIR_STORAGE_POOL_DIR: case VIR_STORAGE_POOL_DIR:
case VIR_STORAGE_POOL_FS: case VIR_STORAGE_POOL_FS:
case VIR_STORAGE_POOL_NETFS: case VIR_STORAGE_POOL_NETFS:
return VIR_STORAGE_VOL_FILE; return VIR_STORAGE_VOL_FILE;
default: default:
return VIR_STORAGE_VOL_BLOCK; return VIR_STORAGE_VOL_BLOCK;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册