diff options
author | Florian Fainelli <florian@openwrt.org> | 2011-06-02 14:38:01 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2011-06-02 14:38:01 +0000 |
commit | 90f0d47a03d02e6b19d24b6a745fe30de1e03418 (patch) | |
tree | 9f3c1011629d2b75d3299dde2e74c2c7ba41925d /package/soloscli/patches/001-newline.patch | |
parent | 7d8d47d29e5d001bb43c6a7c0b0fecc4ccabddb2 (diff) | |
download | mtk-20170518-90f0d47a03d02e6b19d24b6a745fe30de1e03418.zip mtk-20170518-90f0d47a03d02e6b19d24b6a745fe30de1e03418.tar.gz mtk-20170518-90f0d47a03d02e6b19d24b6a745fe30de1e03418.tar.bz2 |
soloscli: fix new lines in soloscli
If the string received from the ADSL firmware is missing \n, add it in.
Signed-off-by: Nathan Williams <nathan@traverse.com.au>
SVN-Revision: 27096
Diffstat (limited to 'package/soloscli/patches/001-newline.patch')
-rw-r--r-- | package/soloscli/patches/001-newline.patch | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/package/soloscli/patches/001-newline.patch b/package/soloscli/patches/001-newline.patch index 69cd5b2..4b663e8 100644 --- a/package/soloscli/patches/001-newline.patch +++ b/package/soloscli/patches/001-newline.patch @@ -1,11 +1,15 @@ --- a/soloscli/soloscli.c +++ b/soloscli/soloscli.c -@@ -238,7 +238,7 @@ +@@ -238,7 +238,11 @@ } if (strcmp(buf,pid) == 0) { /* printf("Sequence matches.\n"); */ - printf("%s",bufp); -+ printf("%s\n",bufp); ++ if(buf[(len-1)] == '\n'){ ++ printf("%s",bufp); ++ } else { ++ printf("%s\n",bufp); ++ } } else { printf("Sequence incorrect.\n"); buf[i] = '\n'; |