commit cpustat for openSUSE:Factory
Hello community, here is the log from the commit of package cpustat for openSUSE:Factory checked in at 2019-08-09 16:54:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cpustat (Old) and /work/SRC/openSUSE:Factory/.cpustat.new.9556 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "cpustat" Fri Aug 9 16:54:56 2019 rev:6 rq:721969 version:0.02.09 Changes: -------- --- /work/SRC/openSUSE:Factory/cpustat/cpustat.changes 2019-01-21 10:58:23.531428182 +0100 +++ /work/SRC/openSUSE:Factory/.cpustat.new.9556/cpustat.changes 2019-08-09 16:55:01.281445154 +0200 @@ -1,0 +2,17 @@ +Tue Jul 30 19:11:01 UTC 2019 - Martin Hauke <mardnh@gmx.de> + +- Update to version 0.02.09 + * Makefile: bump version + * Makefile: remove -g flag + * Avoid division by zero if total is zero + +------------------------------------------------------------------- +Fri Jul 12 18:30:28 UTC 2019 - Martin Hauke <mardnh@gmx.de> + +- Update to version 0.02.08 + * Makefile: bump version + * Fix strncpy string size + * Reduce scope of variable i + * Update copyright year + +------------------------------------------------------------------- Old: ---- cpustat-0.02.07.tar.xz New: ---- cpustat-0.02.09.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cpustat.spec ++++++ --- /var/tmp/diff_new_pack.nGbRpY/_old 2019-08-09 16:55:01.737445045 +0200 +++ /var/tmp/diff_new_pack.nGbRpY/_new 2019-08-09 16:55:01.741445044 +0200 @@ -13,12 +13,12 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: cpustat -Version: 0.02.07 +Version: 0.02.09 Release: 0 Summary: Periodic cpu utilization statistics License: GPL-2.0-or-later ++++++ cpustat-0.02.07.tar.xz -> cpustat-0.02.09.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpustat-0.02.07/Makefile new/cpustat-0.02.09/Makefile --- old/cpustat-0.02.07/Makefile 2018-10-24 10:23:23.000000000 +0200 +++ new/cpustat-0.02.09/Makefile 2019-07-30 14:18:48.000000000 +0200 @@ -1,5 +1,5 @@ # -# Copyright (C) 2011-2018 Canonical +# Copyright (C) 2011-2019 Canonical # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -18,9 +18,9 @@ # Author: Colin Ian King <colin.king@canonical.com> # -VERSION=0.02.07 +VERSION=0.02.09 -CFLAGS += -Wall -Wextra -DVERSION='"$(VERSION)"' -O2 -g +CFLAGS += -Wall -Wextra -DVERSION='"$(VERSION)"' -O2 # # Pedantic flags diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpustat-0.02.07/cpustat.c new/cpustat-0.02.09/cpustat.c --- old/cpustat-0.02.07/cpustat.c 2018-10-24 10:23:23.000000000 +0200 +++ new/cpustat-0.02.09/cpustat.c 2019-07-30 14:18:48.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2018 Canonical + * Copyright (C) 2011-2019 Canonical * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -1060,9 +1060,10 @@ static char str[256]; static char *hdrptr; char *ptr; - int i; if (!hdrptr) { + int i; + hdrptr = str; (void)strncpy(hdrptr, " %CPU %USR %SYS ", sizeof(str)); hdrptr += 23; @@ -1078,7 +1079,7 @@ struct tm tm; get_tm(time_now, &tm); - (void)strncpy(ptr, " (", 3); + (void)strncpy(ptr, " (", 4); ptr += 3; ptr += putint(ptr, 2, tm.tm_hour, true); *ptr = ':'; @@ -1379,7 +1380,7 @@ (void)printf("%6.2f - %6.2f %8u %6.2f\n", prev, prev + division - 0.001, bucket[i], - 100.0 * (double)bucket[i] / (double)total); + total ? 100.0 * (double)bucket[i] / (double)total : 0.0); } putc('\n', stdout); }
participants (1)
-
root