Reuse common definitions.
Signed-off-by: Robert Love <[email protected]>
Tested-by: Ross Brattain <[email protected]>
---
fcoemon.c | 5 -----
fipvlan.c | 4 ++--
include/fcoe_utils.h | 5 +++++
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/fcoemon.c b/fcoemon.c
index 7f10943..7f81a1d 100644
--- a/fcoemon.c
+++ b/fcoemon.c
@@ -83,11 +83,6 @@
#define FCM_PING_REQ_LEN 1 /* byte-length of dcbd PING request */
#define FCM_PING_RSP_LEN 8 /* byte-length of dcbd PING response */
-#define FCOE_CREATE SYSFS_FCOE "/create"
-#define FCOE_DESTROY SYSFS_FCOE "/destroy"
-#define FCOE_ENABLE SYSFS_FCOE "/enable"
-#define FCOE_DISABLE SYSFS_FCOE "/disable"
-
#define FCM_VLAN_DISC_TIMEOUT (1000 * 1000) /* 1 seconds */
#define FCM_VLAN_DISC_MAX 10 /* stop after 10 attempts */
diff --git a/fipvlan.c b/fipvlan.c
index 592cd51..3f4fe9c 100644
--- a/fipvlan.c
+++ b/fipvlan.c
@@ -553,9 +553,9 @@ int fcoe_instance_start(char *ifname)
{
int fd, rc;
FIP_LOG_DBG("%s on %s\n", __func__, ifname);
- fd = open(SYSFS_FCOE "/create", O_WRONLY);
+ fd = open(FCOE_CREATE, O_WRONLY);
if (fd < 0) {
- FIP_LOG_ERRNO("Failed to open file:%s", SYSFS_FCOE "/create");
+ FIP_LOG_ERRNO("Failed to open file:%s", FCOE_CREATE);
FIP_LOG_ERRNO("May be fcoe stack not loaded, starting"
" fcoe service will fix that");
return fd;
diff --git a/include/fcoe_utils.h b/include/fcoe_utils.h
index 11e5fdd..ca3288c 100644
--- a/include/fcoe_utils.h
+++ b/include/fcoe_utils.h
@@ -40,6 +40,11 @@
#define SYSFS_FCHOST SYSFS_MOUNT "/class/fc_host"
#define SYSFS_FCOE SYSFS_MOUNT "/module/libfcoe/parameters"
+#define FCOE_CREATE SYSFS_FCOE "/create"
+#define FCOE_DESTROY SYSFS_FCOE "/destroy"
+#define FCOE_ENABLE SYSFS_FCOE "/enable"
+#define FCOE_DISABLE SYSFS_FCOE "/disable"
+
#define FCHOSTBUFLEN 64
/*
_______________________________________________
devel mailing list
[email protected]
https://lists.open-fcoe.org/mailman/listinfo/devel