]> xenbits.xensource.com Git - libvirt.git/commitdiff
libvirt.c: Move virDomainGetFSInfo to libvirt-domain.c
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 2 Dec 2014 08:29:21 +0000 (09:29 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 2 Dec 2014 12:49:50 +0000 (13:49 +0100)
Since our big split of libvirt.c there are only a few functions
living there. The majority was moved to corresponding subfile,
e.g. domain functions were moved to libvirt-domain.c. However,
the patches for virDomainGetFSInfo() and virDomainFSInfoFree()
introduction were posted prior the big split and merged after.
This resulted in two domain functions landing in wrong file.
Move them to the correct one.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/libvirt-domain.c
src/libvirt.c

index 2b0defc75d43e9aacb82823db80b41b4cfc367d0..01bd9e4e76be3f352061655ce3da58d9b7aeafc3 100644 (file)
@@ -11111,3 +11111,70 @@ virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats)
 
     VIR_FREE(stats);
 }
+
+
+/**
+ * virDomainGetFSInfo:
+ * @dom: a domain object
+ * @info: a pointer to a variable to store an array of mount points information
+ * @flags: extra flags; not used yet, so callers should always pass 0
+ *
+ * Get a list of mapping information for each mounted file systems within the
+ * specified guest and the disks.
+ *
+ * Returns the number of returned mount points, or -1 in case of error.
+ * On success, the array of the information is stored into @info. The caller is
+ * responsible for calling virDomainFSInfoFree() on each array element, then
+ * calling free() on @info. On error, @info is set to NULL.
+ */
+int
+virDomainGetFSInfo(virDomainPtr dom,
+                   virDomainFSInfoPtr **info,
+                   unsigned int flags)
+{
+    VIR_DOMAIN_DEBUG(dom, "info=%p, flags=%x", info, flags);
+
+    virResetLastError();
+
+    virCheckDomainReturn(dom, -1);
+    virCheckReadOnlyGoto(dom->conn->flags, error);
+    virCheckNonNullArgGoto(info, error);
+    *info = NULL;
+
+    if (dom->conn->driver->domainGetFSInfo) {
+        int ret = dom->conn->driver->domainGetFSInfo(dom, info, flags);
+        if (ret < 0)
+            goto error;
+        return ret;
+    }
+
+    virReportUnsupportedError();
+
+ error:
+    virDispatchError(dom->conn);
+    return -1;
+}
+
+
+/**
+ * virDomainFSInfoFree:
+ * @info: pointer to a FSInfo object
+ *
+ * Frees all the memory occupied by @info.
+ */
+void
+virDomainFSInfoFree(virDomainFSInfoPtr info)
+{
+    size_t i;
+
+    if (!info)
+        return;
+
+    VIR_FREE(info->mountpoint);
+    VIR_FREE(info->name);
+    VIR_FREE(info->fstype);
+
+    for (i = 0; i < info->ndevAlias; i++)
+        VIR_FREE(info->devAlias[i]);
+    VIR_FREE(info->devAlias);
+}
index 86b0daa46f76ab4d53aa0dd75ea801d5686f94a7..d51c01497f447d508320531f37dea5f5c61a230d 100644 (file)
@@ -1400,73 +1400,6 @@ virConnectOpenAuth(const char *name,
 }
 
 
-/**
- * virDomainGetFSInfo:
- * @dom: a domain object
- * @info: a pointer to a variable to store an array of mount points information
- * @flags: extra flags; not used yet, so callers should always pass 0
- *
- * Get a list of mapping information for each mounted file systems within the
- * specified guest and the disks.
- *
- * Returns the number of returned mount points, or -1 in case of error.
- * On success, the array of the information is stored into @info. The caller is
- * responsible for calling virDomainFSInfoFree() on each array element, then
- * calling free() on @info. On error, @info is set to NULL.
- */
-int
-virDomainGetFSInfo(virDomainPtr dom,
-                   virDomainFSInfoPtr **info,
-                   unsigned int flags)
-{
-    VIR_DOMAIN_DEBUG(dom, "info=%p, flags=%x", info, flags);
-
-    virResetLastError();
-
-    virCheckDomainReturn(dom, -1);
-    virCheckReadOnlyGoto(dom->conn->flags, error);
-    virCheckNonNullArgGoto(info, error);
-    *info = NULL;
-
-    if (dom->conn->driver->domainGetFSInfo) {
-        int ret = dom->conn->driver->domainGetFSInfo(dom, info, flags);
-        if (ret < 0)
-            goto error;
-        return ret;
-    }
-
-    virReportUnsupportedError();
-
- error:
-    virDispatchError(dom->conn);
-    return -1;
-}
-
-
-/**
- * virDomainFSInfoFree:
- * @info: pointer to a FSInfo object
- *
- * Frees all the memory occupied by @info.
- */
-void
-virDomainFSInfoFree(virDomainFSInfoPtr info)
-{
-    size_t i;
-
-    if (!info)
-        return;
-
-    VIR_FREE(info->mountpoint);
-    VIR_FREE(info->name);
-    VIR_FREE(info->fstype);
-
-    for (i = 0; i < info->ndevAlias; i++)
-        VIR_FREE(info->devAlias[i]);
-    VIR_FREE(info->devAlias);
-}
-
-
 
 /**
  * virConnectClose: