[libvirt] [PATCH 5/6] storage: scsi: Remove private constants from header

Peter Krempa pkrempa at redhat.com
Wed Jan 18 11:36:29 UTC 2017


They are used only in the SCSI backend driver so there's no need to
pollute the headers.
---
 src/storage/storage_backend_scsi.c | 4 ++++
 src/storage/storage_backend_scsi.h | 4 ----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/storage/storage_backend_scsi.c b/src/storage/storage_backend_scsi.c
index ecad1782c..0cc11486b 100644
--- a/src/storage/storage_backend_scsi.c
+++ b/src/storage/storage_backend_scsi.c
@@ -40,6 +40,10 @@

 VIR_LOG_INIT("storage.storage_backend_scsi");

+#define LINUX_SYSFS_SCSI_HOST_PREFIX "/sys/class/scsi_host"
+#define LINUX_SYSFS_SCSI_HOST_POSTFIX "device"
+#define LINUX_SYSFS_SCSI_HOST_SCAN_STRING "- - -"
+
 typedef struct _virStoragePoolFCRefreshInfo virStoragePoolFCRefreshInfo;
 typedef virStoragePoolFCRefreshInfo *virStoragePoolFCRefreshInfoPtr;
 struct _virStoragePoolFCRefreshInfo {
diff --git a/src/storage/storage_backend_scsi.h b/src/storage/storage_backend_scsi.h
index 691b8cbf1..1ba53a57c 100644
--- a/src/storage/storage_backend_scsi.h
+++ b/src/storage/storage_backend_scsi.h
@@ -26,10 +26,6 @@

 # include "storage_backend.h"

-# define LINUX_SYSFS_SCSI_HOST_PREFIX "/sys/class/scsi_host"
-# define LINUX_SYSFS_SCSI_HOST_POSTFIX "device"
-# define LINUX_SYSFS_SCSI_HOST_SCAN_STRING "- - -"
-
 extern virStorageBackend virStorageBackendSCSI;

 #endif /* __VIR_STORAGE_BACKEND_SCSI_H__ */
-- 
2.11.0




More information about the libvir-list mailing list