[PATCH 14/18] util: virstorage: Kill struct virStorageFileMetadata

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remove the now unused pieces of the structure.
---
 src/libvirt_private.syms  |  1 -
 src/util/virstoragefile.c | 23 -----------------------
 src/util/virstoragefile.h | 37 -------------------------------------
 3 files changed, 61 deletions(-)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 69c986f..fe8a810 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1824,7 +1824,6 @@ virStorageFileFeatureTypeFromString;
 virStorageFileFeatureTypeToString;
 virStorageFileFormatTypeFromString;
 virStorageFileFormatTypeToString;
-virStorageFileFreeMetadata;
 virStorageFileGetLVMKey;
 virStorageFileGetMetadata;
 virStorageFileGetMetadataFromBuf;
diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index e7dc6ae..db6b02c 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -1307,29 +1307,6 @@ virStorageFileChainGetBroken(virStorageSourcePtr chain,


 /**
- * virStorageFileMetadataFree:
- *
- * Free pointers in passed structure and structure itself.
- */
-void
-virStorageFileFreeMetadata(virStorageFileMetadata *meta)
-{
-    if (!meta)
-        return;
-
-    VIR_FREE(meta->relPath);
-    VIR_FREE(meta->path);
-    VIR_FREE(meta->relDir);
-
-    virStorageFileFreeMetadata(meta->backingMeta);
-    VIR_FREE(meta->backingStoreRaw);
-    VIR_FREE(meta->compat);
-    virBitmapFree(meta->features);
-    virStorageEncryptionFree(meta->encryption);
-    VIR_FREE(meta);
-}
-
-/**
  * virStorageFileResize:
  *
  * Change the capacity of the raw storage file at 'path'.
diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h
index 89fa1ee..fa9ae44 100644
--- a/src/util/virstoragefile.h
+++ b/src/util/virstoragefile.h
@@ -116,41 +116,6 @@ struct _virStorageTimestamps {
 };


-typedef struct _virStorageFileMetadata virStorageFileMetadata;
-typedef virStorageFileMetadata *virStorageFileMetadataPtr;
-struct _virStorageFileMetadata {
-    /* Name of the current file as spelled by the user (top level) or
-     * metadata of the overlay (if this is a backing store).  */
-    char *relPath;
-    /* Canonical name of the current file, used to detect loops in the
-     * backing store chain.  */
-    char *path;
-    /* Directory to start from if backingStoreRaw is a relative file
-     * name.  */
-    char *relDir;
-    /* Name of the child backing store recorded in metadata of the
-     * current file.  */
-    char *backingStoreRaw;
-
-    /* Backing chain.  In the common case, the child's
-     * backingMeta->path will be a duplicate of this file's
-     * backingStoreRaw; this setup makes it possible to detect missing
-     * backing files: if backingStoreRaw is NULL, this field should be
-     * NULL.  If this field is NULL and backingStoreRaw is non-NULL,
-     * there was an error following the chain (such as a missing
-     * file).  Otherwise, information about the child is here.  */
-    virStorageFileMetadataPtr backingMeta;
-
-    /* Details about the current image */
-    int type; /* enum virStorageType */
-    int format; /* enum virStorageFileFormat */
-    virStorageEncryptionPtr encryption;
-    unsigned long long capacity;
-    virBitmapPtr features; /* bits described by enum virStorageFileFeature */
-    char *compat;
-};
-
-
 /* Information related to network storage */
 enum virStorageNetProtocol {
     VIR_STORAGE_NET_PROTOCOL_NBD,
@@ -323,8 +288,6 @@ const char *virStorageFileChainLookup(virStorageSourcePtr chain,
                                       const char **parent)
     ATTRIBUTE_NONNULL(1);

-void virStorageFileFreeMetadata(virStorageFileMetadataPtr meta);
-
 int virStorageFileResize(const char *path,
                          unsigned long long capacity,
                          unsigned long long orig_capacity,
-- 
1.9.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]