Enhance the format strings patch to fix ppc64 build failures too
This commit is contained in:
parent
deea7f9098
commit
5e980b53e4
@ -1,3 +1,58 @@
|
|||||||
|
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
|
diff --git a/fcoeadm_display.c b/fcoeadm_display.c
|
||||||
index e1cbd48..a6cf7a3 100644
|
index e1cbd48..a6cf7a3 100644
|
||||||
--- a/fcoeadm_display.c
|
--- a/fcoeadm_display.c
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: fcoe-utils
|
Name: fcoe-utils
|
||||||
Version: 1.0.28
|
Version: 1.0.28
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Fibre Channel over Ethernet utilities
|
Summary: Fibre Channel over Ethernet utilities
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
@ -86,6 +86,9 @@ done
|
|||||||
%{_libexecdir}/fcoe/
|
%{_libexecdir}/fcoe/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jun 10 2013 Petr Šabata <contyk@redhat.com> - 1.0.28-2
|
||||||
|
- Enhance the format strings patch to fix ppc64 build failures too
|
||||||
|
|
||||||
* Tue Jun 04 2013 Petr Šabata <contyk@redhat.com> - 1.0.28-1
|
* Tue Jun 04 2013 Petr Šabata <contyk@redhat.com> - 1.0.28-1
|
||||||
- 1.0.28 bump
|
- 1.0.28 bump
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user