[libvirt] [PATCH] Remove unused file volume format 'dir'

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

 



It isn't documented, detected, and barely has any code accomodating it.
Appears to be left over from an earlier iteration of the storage APIs.

Thanks,
Cole
commit 2aec7c2f843d30e5b6882b8a335494a2de7bc156
Author: Cole Robinson <crobinso@xxxxxxxxxx>
Date:   Wed Apr 22 14:54:31 2009 -0400

    Remove storage volume format 'dir'
    
    Isn't documented, detected, and barely has any code accomodating it. Appears
    to be left over from an earlier iteration of the storage APIs.

diff --git a/src/storage_backend_fs.c b/src/storage_backend_fs.c
index 42c8c46..5ea39a5 100644
--- a/src/storage_backend_fs.c
+++ b/src/storage_backend_fs.c
@@ -1080,20 +1080,6 @@ virStorageBackendFileSystemVolBuild(virConnectPtr conn,
             }
         }
 
-    } else if (vol->target.format == VIR_STORAGE_VOL_FILE_DIR) {
-        if (mkdir(vol->target.path, vol->target.perms.mode) < 0) {
-            virReportSystemError(conn, errno,
-                                 _("cannot create path '%s'"),
-                                 vol->target.path);
-            return -1;
-        }
-
-        if ((fd = open(vol->target.path, O_RDWR)) < 0) {
-            virReportSystemError(conn, errno,
-                                 _("cannot read path '%s'"),
-                                 vol->target.path);
-            return -1;
-        }
     } else {
 #if HAVE_QEMU_IMG
         const char *type = virStorageVolFormatFileSystemTypeToString(vol->target.format);
diff --git a/src/storage_conf.h b/src/storage_conf.h
index 8a4fed2..f8bd446 100644
--- a/src/storage_conf.h
+++ b/src/storage_conf.h
@@ -395,7 +395,6 @@ VIR_ENUM_DECL(virStoragePoolFormatLogical)
 
 enum virStorageVolFormatFileSystem {
     VIR_STORAGE_VOL_FILE_RAW = 0,
-    VIR_STORAGE_VOL_FILE_DIR,
     VIR_STORAGE_VOL_FILE_BOCHS,
     VIR_STORAGE_VOL_FILE_CLOOP,
     VIR_STORAGE_VOL_FILE_COW,
--
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]