diff --git a/fcoe-utils-1.0.28-format-strings.patch b/fcoe-utils-1.0.28-format-strings.patch index 5cf5292..c519817 100644 --- a/fcoe-utils-1.0.28-format-strings.patch +++ b/fcoe-utils-1.0.28-format-strings.patch @@ -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 + #include + #include ++#include + #include + #include + #include +@@ -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 diff --git a/fcoe-utils.spec b/fcoe-utils.spec index 96d9963..2eeb7e7 100644 --- a/fcoe-utils.spec +++ b/fcoe-utils.spec @@ -3,7 +3,7 @@ Name: fcoe-utils Version: 1.0.28 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Fibre Channel over Ethernet utilities Group: Applications/System License: GPLv2 @@ -86,6 +86,9 @@ done %{_libexecdir}/fcoe/ %changelog +* Mon Jun 10 2013 Petr Šabata - 1.0.28-2 +- Enhance the format strings patch to fix ppc64 build failures too + * Tue Jun 04 2013 Petr Šabata - 1.0.28-1 - 1.0.28 bump