From: Florian Fainelli Date: Tue, 26 May 2009 14:21:59 +0000 (+0000) Subject: [package] use debian's patch to some display issues (#5182) X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1d68c1f381ddf680fba098f7404a042fffe73b72;p=openwrt%2Fsvn-archive%2Farchive.git [package] use debian's patch to some display issues (#5182) SVN-Revision: 16080 --- diff --git a/net/bwm/Makefile b/net/bwm/Makefile index be86629c3b..17d2c30b07 100644 --- a/net/bwm/Makefile +++ b/net/bwm/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bwm PKG_VERSION:=1.1.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/b/bwm diff --git a/net/bwm/patches/001-debian.patch b/net/bwm/patches/001-debian.patch new file mode 100644 index 0000000000..043d862dcd --- /dev/null +++ b/net/bwm/patches/001-debian.patch @@ -0,0 +1,45 @@ +--- a/bwm.c ++++ b/bwm.c +@@ -57,7 +57,8 @@ int main(int argc, char *argv[]) + char buffer[256]; + char *buffer_pointer; + +- int inum; ++ int inum = -1; ++ int oldinum = -1; + int field_number; + int total_counter; + int sleep_time = 2; +@@ -90,7 +91,13 @@ int main(int argc, char *argv[]) + + while(1) + { +- printf("%c[H",27); ++ if (inum==oldinum) ++ { ++ printf("%c[H",27); ++ } else { ++ printf("%c[H%c[J",27,27); ++ oldinum = inum; ++ } + printf("Bandwidth Monitor 1.1.0\n\n"); + printf(" Iface RX(KB/sec) TX(KB/sec) Total(KB/sec)\n\n"); + +@@ -138,7 +145,7 @@ int main(int argc, char *argv[]) + + interface[inum].rx_kbytes_dif = + (interface[inum].rx_bytes_new - +- interface[inum].rx_bytes_old) * 1000 / 1024; ++ interface[inum].rx_bytes_old) / 1024 * 1000; + + interface[inum].rx_rate_whole = + interface[inum].rx_kbytes_dif / +@@ -157,7 +164,7 @@ int main(int argc, char *argv[]) + + interface[inum].tx_kbytes_dif = + (interface[inum].tx_bytes_new - +- interface[inum].tx_bytes_old) * 1000 / 1024; ++ interface[inum].tx_bytes_old) / 1024 * 1000; + + interface[inum].tx_rate_whole = + interface[inum].tx_kbytes_dif /