]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
util: virstorage: Kill struct virStorageFileMetadata
authorPeter Krempa <pkrempa@redhat.com>
Thu, 17 Apr 2014 14:15:45 +0000 (16:15 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 23 Apr 2014 21:11:07 +0000 (23:11 +0200)
Remove the now unused pieces of the structure.

src/libvirt_private.syms
src/util/virstoragefile.c
src/util/virstoragefile.h

index f4ba406dd63614a4d865713a6c16fcbd25694d34..53dbdb4e8fc3fea4f1c04665d44f3bb9b9784d68 100644 (file)
@@ -1823,7 +1823,6 @@ virStorageFileFeatureTypeFromString;
 virStorageFileFeatureTypeToString;
 virStorageFileFormatTypeFromString;
 virStorageFileFormatTypeToString;
-virStorageFileFreeMetadata;
 virStorageFileGetLVMKey;
 virStorageFileGetMetadata;
 virStorageFileGetMetadataFromBuf;
index 2bfad0d0e9bb56e826dd7d8663a8a6b2814d2f67..d390fc3c9dc2225b9b140a5175aa83d4809973d8 100644 (file)
@@ -1312,29 +1312,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:
  *
index 89fa1ee13354b9dad754d9efc76cba67fd80e2aa..fa9ae44cf3dfc4b073b2abc269f776dcc4f3fbe1 100644 (file)
@@ -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,