update to upstream v1.0.29-29-g9267509

This commit is contained in:
Chris Leech 2014-10-07 14:06:37 -07:00
parent 02d57b611b
commit 81c0139d2a
5 changed files with 1293 additions and 168 deletions

View File

@ -1,13 +0,0 @@
diff --git a/fcnsq.c b/fcnsq.c
index 8722b21..466a85e 100644
--- a/fcnsq.c
+++ b/fcnsq.c
@@ -360,7 +360,7 @@ static void help(int status)
" --gspn <port id>\n"
" --gsnn <world wide node name>\n"
"Options:\n"
- " --quiet print minimal results on success, and no error messages\n"
+ " --quiet|-q print minimal results on success, and no error messages\n"
"\n"
"Port IDs and World Wide Names must be specified in hexadecimal.\n"
);

View File

@ -1,118 +0,0 @@
diff --git a/fcnsq.c b/fcnsq.c
index 45dff40..c5b78b9 100644
--- a/fcnsq.c
+++ b/fcnsq.c
@@ -24,6 +24,7 @@
#include <stdarg.h>
#include <stdbool.h>
#include <unistd.h>
+#include <inttypes.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
@@ -227,7 +228,7 @@ static int gpn_id(int bsg, u32 fcid)
rjt = gn_id(bsg, fcid, FC_NS_GPN_ID, &wwpn);
if (rjt)
goto fail;
- print_result("Port Name", "%16.16llx\n", wwpn);
+ print_result("Port Name", "%16.16jx\n", (uintmax_t)wwpn);
return 0;
fail:
if (rjt == (u16) ~0)
@@ -248,7 +249,7 @@ static int gnn_id(int bsg, u32 fcid)
rjt = gn_id(bsg, fcid, FC_NS_GNN_ID, &wwnn);
if (rjt)
goto fail;
- print_result("Node Name", "%16.16llx\n", wwnn);
+ print_result("Node Name", "%16.16jx\n", (uintmax_t)wwnn);
return 0;
fail:
if (rjt == (u16) ~0)
@@ -373,11 +374,12 @@ int main(int argc, char *argv[])
{
char *bsg;
int bsg_dev;
- u32 port_id;
- u64 wwnn;
+ u32 port_id = 0;
+ u64 wwnn = 0;
int rc = 0;
enum commands cmd = 0;
char c;
+ uintmax_t wwnn_tmp = 0;
while(1) {
c = getopt_long_only(argc, argv, "", options, NULL);
@@ -402,7 +404,8 @@ int main(int argc, char *argv[])
if (cmd)
help(-1);
cmd = c;
- sscanf(optarg, "%llx", &wwnn);
+ sscanf(optarg, "%jx", &wwnn_tmp);
+ wwnn = (u64)wwnn_tmp;
break;
}
}
diff --git a/fcoeadm_display.c b/fcoeadm_display.c
index e1cbd48..a6cf7a3 100644
--- a/fcoeadm_display.c
+++ b/fcoeadm_display.c
@@ -1426,8 +1426,8 @@ void print_fcoe_fcf_device(void *ep, void *arg)
if (!buf)
buf = temp;
printf(" Connection Mode: %s\n", buf);
- printf(" Fabric Name: 0x%016lx\n", fcf->fabric_name);
- printf(" Switch Name 0x%016lx\n", fcf->switch_name);
+ printf(" Fabric Name: 0x%016" PRIx64 "\n", fcf->fabric_name);
+ printf(" Switch Name 0x%016" PRIx64 "\n", fcf->switch_name);
mac2str(fcf->mac, mac, MAX_STR_LEN);
printf(" MAC Address: %s\n", mac);
printf(" FCF Priority: %u\n", fcf->priority);
diff --git a/fcoemon.c b/fcoemon.c
index 80360fd..23fae9e 100644
--- a/fcoemon.c
+++ b/fcoemon.c
@@ -2640,7 +2640,7 @@ static void fcm_dcbd_get_oper(struct fcm_netif *ff, char *resp, char *cp)
if (ep) {
FCM_LOG_DEV(ff, "Invalid get oper response "
- "parse error byte %ld, resp %s", ep - cp, cp);
+ "parse error byte %td, resp %s", ep - cp, cp);
fcm_dcbd_state_set(ff, FCD_ERROR);
} else {
if (val && fcoe_config.debug)
diff --git a/fcping.c b/fcping.c
index bc51d5f..f92516f 100644
--- a/fcping.c
+++ b/fcping.c
@@ -25,6 +25,7 @@
#include <stddef.h>
#include <stdarg.h>
#include <unistd.h>
+#include <inttypes.h>
#include <errno.h>
#include <string.h>
#include <time.h>
@@ -812,17 +813,17 @@ static void fp_check_data_len()
printf("Maximum ECHO data allowed by the Fabric (0x%06x) : %d bytes.\n"
"Maximum ECHO data allowed by the Source (0x%06x) : %d bytes.\n"
"Maximum ECHO data allowed by the Target (0x%06x) : %d bytes.\n"
- "Maximum ECHO data requested from user input (-s) : %lu "
+ "Maximum ECHO data requested from user input (-s) : %" PRIu32 " "
"(default %d) bytes.\n",
FC_WKA_FABRIC_CONTROLLER, flen, sid, slen, fp_did, dlen,
- fp_len - FP_LEN_ECHO, FP_LEN_DEF);
+ (uint32_t)(fp_len - FP_LEN_ECHO), FP_LEN_DEF);
/* fp_len is the total payload, including 4 bytes for ECHO command */
fp_len = MIN(fp_len, plen + FP_LEN_ECHO);
- printf("Actual FC ELS ECHO data size used : %lu bytes.\n"
+ printf("Actual FC ELS ECHO data size used : %" PRIu32 " bytes.\n"
"Actual FC ELS ECHO payload size used : %d bytes "
- "(including %ld bytes ECHO command).\n",
- fp_len - FP_LEN_ECHO, fp_len, FP_LEN_ECHO);
+ "(including %zu bytes ECHO command).\n",
+ (uint32_t)(fp_len - FP_LEN_ECHO), fp_len, FP_LEN_ECHO);
}
/*

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +0,0 @@
diff --git a/Makefile.am b/Makefile.am
index 5cbc15f..57bdbdb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@
sbin_PROGRAMS = fcoeadm fcoemon fcping fipvlan fcnsq fcrls
## all targets should look for headers in the include directory
-AM_CPPFLAGS = -I${srcdir}/include -I${builddir}/include
+AM_CPPFLAGS = -I${srcdir}/include -I${builddir}/include -I/lib/modules/`rpm -q --list kernel | grep "^/lib/modules/.*/build$$" | cut -f4 -d"/" | sort -r | head -1`/build/include
## pass the sysconfdir into the C proprocessor
AM_CPPFLAGS += -DSYSCONFDIR="\"${sysconfdir}\"" -D_FORTIFY_SOURCE=2
AM_CFLAGS = -Wall -Wformat=2 -Werror -Wmissing-prototypes -Wstrict-prototypes
@@ -67,7 +67,7 @@ init_d_SCRIPTS = etc/initd/fcoe
dist_noinst_DATA = README COPYING INSTALL fcoe-utils.spec etc/config
-BASH_COMPLETION_DIR=/etc/bash_completion.d/
+BASH_COMPLETION_DIR=${DESTDIR}/etc/bash_completion.d/
install-data-hook:
if [ ! -f ${DESTDIR}${fcoe_configdir}/config ] ; then \

View File

@ -3,7 +3,7 @@
Name: fcoe-utils
Version: 1.0.29
Release: 5%{?dist}
Release: 6%{?dist}
Summary: Fibre Channel over Ethernet utilities
Group: Applications/System
License: GPLv2
@ -14,21 +14,16 @@ Source1: quickstart.txt
Source2: fcoe.service
Source3: fcoe.config
ExcludeArch: ppc s390 s390x
# Generic Fedora patches
Patch1: fcoe-utils-1.0.29-make.patch
Patch2: fcoe-utils-1.0.18-help.patch
Patch3: fcoe-utils-1.0.28-format-strings.patch
Patch4: fcoe-utils-1.0.28-systemd-doc.patch
Patch5: fcoe-utils-1.0.29-automake-1.14.patch
Patch1: fcoe-utils-1.0.29-29-g9267509.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libhbaapi-devel >= 2.2-12
BuildRequires: libhbalinux-devel >= 1.0.13
BuildRequires: libhbaapi-devel >= 2.2.9-6
BuildRequires: libhbalinux-devel >= 1.0.16-5
BuildRequires: libtool
BuildRequires: lldpad-devel >= 0.9.43
BuildRequires: systemd
Requires: lldpad >= 0.9.43
Requires: libhbalinux >= 1.0.13
Requires: libhbalinux >= 1.0.16-5
Requires: iproute
Requires: device-mapper-multipath
Requires(post): systemd
@ -43,11 +38,7 @@ fcoemon - service to configure DCB Ethernet QOS filters, works with lldpad
%prep
%setup -q
cp -v %{SOURCE1} quickstart.txt
%patch1 -p1 -b .make
%patch2 -p1 -b .help
%patch3 -p1 -b .format-strings
%patch4 -p1 -b .systemd-doc
%patch5 -p1 -b .automake-1.14
%patch1 -p1 -b .v1_0_29-29
%build
./bootstrap.sh
@ -58,6 +49,7 @@ make %{?_smp_mflags}
make install DESTDIR=%{buildroot}
rm -rf %{buildroot}/etc/init.d
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig %{buildroot}%{_unitdir}
rm -f %{buildroot}%{_unitdir}/*
install -m 644 %{SOURCE2} %{buildroot}%{_unitdir}
install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/fcoe
mkdir -p %{buildroot}%{_libexecdir}/fcoe
@ -90,6 +82,9 @@ rm -f %{buildroot}/%{_sysconfdir}/fcoe/config
%{_libexecdir}/fcoe/
%changelog
* Tue Oct 07 2014 Chris Leech <cleech@redhat.com> - 1.0.29-6
- update to upstream v1.0.29-29-g9267509
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.29-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild