From b46b939406625b71151d63b2ae261e19033b8b34 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Thu, 14 Nov 2013 20:30:43 +0100 Subject: [PATCH 1/9] Add new package slac Update License Signed-off-by: Stefan Wahren --- open-plc-utils.spec | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/open-plc-utils.spec b/open-plc-utils.spec index d1dc9d41..69a149fc 100644 --- a/open-plc-utils.spec +++ b/open-plc-utils.spec @@ -4,11 +4,11 @@ Summary: Open version of the Qualcomm Atheros Powerline Toolkit Name: open-plc-utils -Version: 0.0.2 +Version: 0.0.3 Release: 1 Source: https://codeload.github.com/qca/open-plc-utils/zip/master/open-plc-utils-master.zip URL: https://github.com/qca/open-plc-utils.git -License: ISC +License: BSD Vendor: Qualcomm-Atheros Group: Productivity/Networking/Diagnostic BuildRoot: {_tmppath}/%{name}-%{version}-build @@ -18,6 +18,15 @@ AutoReqProv: on This package installs the tools required to configure Qualcomm-Atheros Powerline devices on the network. +%package slac +License: BSD +Summary: SLAC tools of the Qualcomm Atheros Powerline Toolkit +Group: Development/Tools/Other +AutoReqProv: on + +%description slac +This package installs the tools for Signal Level Attenuation Characterization. + %prep -q %setup -n open-plc-utils-master @@ -250,6 +259,17 @@ rm -rf "%buildroot" %{_mandir}/man1/weeder.1.gz %{_mandir}/man1/xml2pib.1.gz +%files slac +%defattr (-,root,root) +/usr/local/bin/evse +/usr/local/bin/pev +%{_mandir}/man1/evse.1.gz +%{_mandir}/man1/pev.1.gz + %changelog +* Thu Nov 14 2013 Stefan Wahren - 0.0.3-1 +- Update License +- Add new package slac + * Sat Aug 31 2013 Stefan Wahren - 0.0.2-1 - Initial package based on the debian branch From 99c01f857ea9a53a81d6e6c4db5c414e3e15ba0b Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Fri, 15 Nov 2013 18:55:07 +0100 Subject: [PATCH 2/9] Add parameter S to option list (fix issue #21) Signed-off-by: Stefan Wahren --- plc/plchostd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plc/plchostd.c b/plc/plchostd.c index 6d3841ec..a7d93b1e 100644 --- a/plc/plchostd.c +++ b/plc/plchostd.c @@ -495,7 +495,7 @@ int main (int argc, char const * argv []) extern void terminate (signo_t); static char const * optv [] = { - "dFi:n:N:p:P:qs:t:vw:x", + "dFi:n:N:p:P:qs:S:t:vw:x", "-N file -P file [-S file] [-n file] [-p file]", "Qualcomm Atheros PLC Host Daemon", "d\texecute in background as daemon", From 5379ecce6fb8fb8a31a630529e48ea1bb30c97e1 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sat, 16 Nov 2013 11:22:54 +0100 Subject: [PATCH 3/9] Add missing shebang Signed-off-by: Stefan Wahren --- slac/pl16-evse.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/slac/pl16-evse.sh b/slac/pl16-evse.sh index a44714ee..5f3d7870 100755 --- a/slac/pl16-evse.sh +++ b/slac/pl16-evse.sh @@ -1,3 +1,4 @@ +#!/bin/sh # file: slac/pl16-evse.sh # ==================================================================== From c17af116b7549592fa2673257f24195714c0c78b Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sat, 16 Nov 2013 11:25:29 +0100 Subject: [PATCH 4/9] Remove unnecessary bash dependency Signed-off-by: Stefan Wahren --- scripts/baud.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/baud.sh b/scripts/baud.sh index f223dba5..c7ac0d92 100755 --- a/scripts/baud.sh +++ b/scripts/baud.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # ==================================================================== # set serial port parameters on a Linux system; From b73939e999d9f9b7c38dcea1ab4e0058f7f6ca45 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sat, 16 Nov 2013 11:48:57 +0100 Subject: [PATCH 5/9] Add parameter check and usage info Signed-off-by: Stefan Wahren --- slac/evse.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/slac/evse.sh b/slac/evse.sh index 2c8a92dd..94c9f08a 100755 --- a/slac/evse.sh +++ b/slac/evse.sh @@ -5,6 +5,16 @@ # configure a QCA7000 PIB file as a SLAC-EVSE on Linux or Cygwin. # +if [ $# -ne 1 ]; then + cat << EOF +usage: evse.sh PIBFILE + +This script configures a QCA7000 PIB file as a SLAC-EVSE + +EOF + exit 1 +fi + # ==================================================================== # Manufacturer HFID; # -------------------------------------------------------------------- From fd27585e9c85e421c9e82de41d971bc882ab24cf Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sat, 16 Nov 2013 11:55:02 +0100 Subject: [PATCH 6/9] Fix return type in comment Signed-off-by: Stefan Wahren --- mme/UnwantedMessage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mme/UnwantedMessage.c b/mme/UnwantedMessage.c index d706c6c5..c10f1f39 100644 --- a/mme/UnwantedMessage.c +++ b/mme/UnwantedMessage.c @@ -41,7 +41,7 @@ /*====================================================================* * - * bool UnwantedMessage (void const * memory, size_t extent, uint8_t MMV, uint16_t MMTYPE); + * signed UnwantedMessage (void const * memory, size_t extent, uint8_t MMV, uint16_t MMTYPE); * * mme.h * From b55541a1c9f1c99ec07894ab6331128632d4c20b Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sun, 17 Nov 2013 12:55:08 +0100 Subject: [PATCH 7/9] Fix broken shebang (fix for issue #19) Signed-off-by: Stefan Wahren --- slac/pev.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/slac/pev.sh b/slac/pev.sh index 262491fe..ff210228 100755 --- a/slac/pev.sh +++ b/slac/pev.sh @@ -1,4 +1,5 @@ -#!/bin/sëÞöÏfile: slac/pev.sh +#!/bin/sh +# file: slac/pev.sh # # configure a QCA7000 PIB file as a SLAC-PEV on Linux or Cygwin. From e0a9ebed44cb33e01668ff043c1aebc8258ced42 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sun, 17 Nov 2013 12:58:32 +0100 Subject: [PATCH 8/9] Fix for issue #20 Compare PIB length in header with actual file size only if header value is greater than zero Signed-off-by: Stefan Wahren --- pib/getpib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pib/getpib.c b/pib/getpib.c index 54abe2b7..79d6609f 100644 --- a/pib/getpib.c +++ b/pib/getpib.c @@ -446,7 +446,7 @@ int main (int argc, char const * argv []) argc--; argv++; header = (struct pib_header *)(buffer); - if (extent != LE16TOH (header->PIBLENGTH)) + if (header->PIBLENGTH && (extent != LE16TOH (header->PIBLENGTH))) { error (1, ECANCELED, "Bad PIB filesize: %s", file.name); } From 7458fd3ad5e9cb5f3c7997ac3ca6666d71038a1f Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sun, 17 Nov 2013 13:01:45 +0100 Subject: [PATCH 9/9] Fix compiler warning about missing initializer Add missing initialization for plc.flag2 Signed-off-by: Stefan Wahren --- plc/plc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plc/plc.c b/plc/plc.c index 769b5776..0cb27293 100644 --- a/plc/plc.c +++ b/plc/plc.c @@ -270,6 +270,7 @@ struct plc plc = PLC_COUNT, PLC_INDEX, PLC_FLAGS, + PLC_FLAGS, };