illumos-sysstat (2.10-3)
* Use portable libsunavl * Patched a lot of "NULL <-> 0 " issues
This commit is contained in:
parent
5348aa187a
commit
5a992ebc22
|
@ -1,3 +1,10 @@
|
|||
illumos-sysstat (2.10-3) unstable; urgency=low
|
||||
|
||||
* Use portable libsunavl
|
||||
* Patched a lot of "NULL <-> 0 " issues
|
||||
|
||||
-- Igor Pashev <pashev.igor@gmail.com> Sun, 17 Feb 2013 20:45:23 +0000
|
||||
|
||||
illumos-sysstat (2.10-2) unstable; urgency=low
|
||||
|
||||
* Added cpustat & cputrack
|
||||
|
|
|
@ -20,7 +20,6 @@ Package: sysstat
|
|||
Section: admin
|
||||
Priority: optional
|
||||
Architecture: illumos-any
|
||||
Replaces: illumos-procps ( << 2.10 ), util-illumos ( = 5.11.0-1~2.1 )
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: system statistics utilities
|
||||
This package contains various system statistics utilities
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
Index: illumos-sysstat/usr/src/cmd/cpc/common/cpustat.c
|
||||
===================================================================
|
||||
--- illumos-sysstat.orig/usr/src/cmd/cpc/common/cpustat.c 2012-10-08 00:25:23.000000000 +0000
|
||||
+++ illumos-sysstat/usr/src/cmd/cpc/common/cpustat.c 2013-02-17 20:41:37.163876106 +0000
|
||||
@@ -90,7 +90,7 @@
|
||||
static int max_chip_id;
|
||||
static int *chip_designees; /* cpuid of CPU which counts for phs chip */
|
||||
static int smt = 0; /* If set, cpustat needs to be SMT-aware. */
|
||||
-static pcinfo_t fxinfo = { 0, "FX", NULL }; /* FX scheduler class info */
|
||||
+static pcinfo_t fxinfo = { 0, "FX", 0 }; /* FX scheduler class info */
|
||||
|
||||
static uint_t timestamp_fmt = NODATE;
|
||||
|
||||
@@ -444,7 +444,7 @@
|
||||
goto bad;
|
||||
(void) mutex_lock(&state->soak_lock);
|
||||
state->soak_state = SOAK_PAUSE;
|
||||
- if (thr_create(NULL, 0, soaker, state, NULL, &tid) != 0)
|
||||
+ if (thr_create(NULL, 0, soaker, state, 0, &tid) != 0)
|
||||
goto bad;
|
||||
|
||||
while (state->soak_state == SOAK_PAUSE)
|
|
@ -0,0 +1,13 @@
|
|||
Index: illumos-sysstat/usr/src/cmd/stat/iostat/iostat.c
|
||||
===================================================================
|
||||
--- illumos-sysstat.orig/usr/src/cmd/stat/iostat/iostat.c 2013-02-17 20:47:22.790227717 +0000
|
||||
+++ illumos-sysstat/usr/src/cmd/stat/iostat/iostat.c 2013-02-17 20:49:40.494674810 +0000
|
||||
@@ -1272,7 +1272,7 @@
|
||||
} else
|
||||
(void) sprintf(header, "s/w,h/w,trn,tot");
|
||||
} else
|
||||
- *header = NULL;
|
||||
+ *header = '\0';
|
||||
switch (do_disk & DISK_IO_MASK) {
|
||||
case DISK_OLD:
|
||||
if (do_raw == 0)
|
|
@ -0,0 +1,72 @@
|
|||
Index: illumos-sysstat/usr/src/cmd/stat/common/statcommon.h
|
||||
===================================================================
|
||||
--- illumos-sysstat.orig/usr/src/cmd/stat/common/statcommon.h 2012-10-08 00:25:33.000000000 +0000
|
||||
+++ illumos-sysstat/usr/src/cmd/stat/common/statcommon.h 2013-02-17 20:27:45.532974943 +0000
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <kstat.h>
|
||||
+#include <libsunavl.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/buf.h>
|
||||
@@ -41,7 +42,6 @@
|
||||
#include <sys/sysinfo.h>
|
||||
#include <sys/processor.h>
|
||||
#include <sys/pset.h>
|
||||
-#include <sys/avl.h>
|
||||
|
||||
/* No CPU present at this CPU position */
|
||||
#define ID_NO_CPU -1
|
||||
Index: illumos-sysstat/usr/src/cmd/stat/common/acquire_iodevs.c
|
||||
===================================================================
|
||||
--- illumos-sysstat.orig/usr/src/cmd/stat/common/acquire_iodevs.c 2012-10-08 00:25:33.000000000 +0000
|
||||
+++ illumos-sysstat/usr/src/cmd/stat/common/acquire_iodevs.c 2013-02-17 20:37:14.549293083 +0000
|
||||
@@ -148,8 +148,6 @@
|
||||
* iodev_snapshot in the list.
|
||||
*/
|
||||
|
||||
-#define offsetof(s, m) (size_t)(&(((s *)0)->m)) /* for avl_create */
|
||||
-
|
||||
static int
|
||||
avl_iodev_cmp(const void* is1, const void* is2)
|
||||
{
|
||||
Index: illumos-sysstat/usr/src/cmd/stat/iostat/Makefile
|
||||
===================================================================
|
||||
--- illumos-sysstat.orig/usr/src/cmd/stat/iostat/Makefile 2012-10-08 00:25:33.000000000 +0000
|
||||
+++ illumos-sysstat/usr/src/cmd/stat/iostat/Makefile 2013-02-17 20:38:00.774829261 +0000
|
||||
@@ -30,7 +30,7 @@
|
||||
include $(SRC)/cmd/Makefile.cmd
|
||||
include $(SRC)/cmd/stat/Makefile.stat
|
||||
|
||||
-LDLIBS += -lkstat -ldevinfo -lavl
|
||||
+LDLIBS += -lkstat -ldevinfo -lsunavl
|
||||
CFLAGS += $(CCVERBOSE) -I${STATCOMMONDIR}
|
||||
CERRWARN += -_gcc=-Wno-uninitialized
|
||||
CERRWARN += -_gcc=-Wno-switch
|
||||
Index: illumos-sysstat/usr/src/cmd/stat/mpstat/Makefile
|
||||
===================================================================
|
||||
--- illumos-sysstat.orig/usr/src/cmd/stat/mpstat/Makefile 2012-10-08 00:25:33.000000000 +0000
|
||||
+++ illumos-sysstat/usr/src/cmd/stat/mpstat/Makefile 2013-02-17 20:37:35.244174135 +0000
|
||||
@@ -30,7 +30,7 @@
|
||||
include $(SRC)/cmd/Makefile.cmd
|
||||
include $(SRC)/cmd/stat/Makefile.stat
|
||||
|
||||
-LDLIBS += -ldevinfo -lkstat -lavl
|
||||
+LDLIBS += -ldevinfo -lkstat -lsunavl
|
||||
CFLAGS += $(CCVERBOSE) -I${STATCOMMONDIR}
|
||||
CERRWARN += -_gcc=-Wno-uninitialized
|
||||
CERRWARN += -_gcc=-Wno-switch
|
||||
Index: illumos-sysstat/usr/src/cmd/stat/vmstat/Makefile
|
||||
===================================================================
|
||||
--- illumos-sysstat.orig/usr/src/cmd/stat/vmstat/Makefile 2012-10-08 00:25:33.000000000 +0000
|
||||
+++ illumos-sysstat/usr/src/cmd/stat/vmstat/Makefile 2013-02-17 20:38:15.677487913 +0000
|
||||
@@ -30,7 +30,7 @@
|
||||
include $(SRC)/cmd/Makefile.cmd
|
||||
include $(SRC)/cmd/stat/Makefile.stat
|
||||
|
||||
-LDLIBS += -ldevinfo -lkstat -lavl
|
||||
+LDLIBS += -ldevinfo -lkstat -lsunavl
|
||||
CFLAGS += $(CCVERBOSE) -I${STATCOMMONDIR}
|
||||
CERRWARN += -_gcc=-Wno-switch
|
||||
CERRWARN += -_gcc=-Wno-uninitialized
|
|
@ -0,0 +1,47 @@
|
|||
Index: illumos-sysstat/usr/src/cmd/stat/mpstat/mpstat.c
|
||||
===================================================================
|
||||
--- illumos-sysstat.orig/usr/src/cmd/stat/mpstat/mpstat.c 2012-10-08 00:25:33.000000000 +0000
|
||||
+++ illumos-sysstat/usr/src/cmd/stat/mpstat/mpstat.c 2013-02-17 20:36:38.827589417 +0000
|
||||
@@ -110,7 +110,7 @@
|
||||
usage();
|
||||
display_pset = (int)strtol
|
||||
(optarg, &endptr, 10);
|
||||
- if (*endptr != NULL)
|
||||
+ if (*endptr != '\0')
|
||||
usage();
|
||||
/*
|
||||
* Not valid to specify a negative processor
|
||||
@@ -143,13 +143,13 @@
|
||||
|
||||
if (argc > optind) {
|
||||
interval = (int)strtol(argv[optind], &endptr, 10);
|
||||
- if (*endptr != NULL)
|
||||
+ if (*endptr != '\0')
|
||||
usage();
|
||||
period_n = (hrtime_t)interval * NANOSEC;
|
||||
if (argc > optind + 1) {
|
||||
iter = (unsigned int)strtoul
|
||||
(argv[optind + 1], &endptr, 10);
|
||||
- if (*endptr != NULL || iter < 0)
|
||||
+ if (*endptr != '\0' || iter < 0)
|
||||
usage();
|
||||
if (iter == 0)
|
||||
return (0);
|
||||
@@ -314,7 +314,7 @@
|
||||
{
|
||||
size_t i;
|
||||
|
||||
- if (p->ps_nr_cpus == NULL)
|
||||
+ if (p->ps_nr_cpus == 0)
|
||||
return (NULL);
|
||||
|
||||
if (kstat_copy(&p->ps_cpus[0]->cs_vm, ks))
|
||||
@@ -334,7 +334,7 @@
|
||||
{
|
||||
size_t i;
|
||||
|
||||
- if (p->ps_nr_cpus == NULL)
|
||||
+ if (p->ps_nr_cpus == 0)
|
||||
return (NULL);
|
||||
|
||||
if (kstat_copy(&p->ps_cpus[0]->cs_sys, ks))
|
|
@ -2,3 +2,8 @@ iostat-kstat-data-type.patch
|
|||
iostat-pset_list-args.patch
|
||||
iostat-missing-headers.patch
|
||||
cpustat-no-isaexec.patch
|
||||
libsunavl.patch
|
||||
stat-pointers.patch
|
||||
mpstat-pointers.patch
|
||||
cpustat-pointers.patch
|
||||
iostat-pointers.patch
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
Index: illumos-sysstat/usr/src/cmd/stat/common/acquire_iodevs.c
|
||||
===================================================================
|
||||
--- illumos-sysstat.orig/usr/src/cmd/stat/common/acquire_iodevs.c 2013-02-17 20:30:09.403571089 +0000
|
||||
+++ illumos-sysstat/usr/src/cmd/stat/common/acquire_iodevs.c 2013-02-17 20:31:29.510430292 +0000
|
||||
@@ -355,7 +355,7 @@
|
||||
return (1); /* pass */
|
||||
|
||||
/* no filtered names, pass if not floppy and skipped */
|
||||
- if (df->if_nr_names == NULL)
|
||||
+ if (df->if_nr_names == 0)
|
||||
return (!(df->if_skip_floppy && is_floppy));
|
||||
|
||||
isn = dev->is_name;
|
||||
@@ -451,7 +451,7 @@
|
||||
* don't want to fill the remaining slots - it is just confusing
|
||||
* if we don that, it makes it look like the filter code is broken.
|
||||
*/
|
||||
- if ((df->if_nr_names == NULL) || (nr_iodevs != nr_iodevs_orig)) {
|
||||
+ if ((df->if_nr_names == 0) || (nr_iodevs != nr_iodevs_orig)) {
|
||||
/* now insert any iodevs into the remaining slots */
|
||||
pos = iodevs;
|
||||
while (pos && nr_iodevs) {
|
||||
Index: illumos-sysstat/usr/src/cmd/stat/common/dsr.c
|
||||
===================================================================
|
||||
--- illumos-sysstat.orig/usr/src/cmd/stat/common/dsr.c 2012-10-08 00:25:33.000000000 +0000
|
||||
+++ illumos-sysstat/usr/src/cmd/stat/common/dsr.c 2013-02-17 20:32:34.081838728 +0000
|
||||
@@ -636,7 +636,7 @@
|
||||
if (*cp == ',') {
|
||||
cp++;
|
||||
while (*cp != ':') {
|
||||
- if (*cp == NULL)
|
||||
+ if (*cp == '\0')
|
||||
return (NULL);
|
||||
cp++;
|
||||
}
|
||||
@@ -648,7 +648,7 @@
|
||||
*/
|
||||
while (*cp) {
|
||||
if (isspace(*cp) || *cp == ',') {
|
||||
- *cp = NULL;
|
||||
+ *cp = '\0';
|
||||
return (path);
|
||||
}
|
||||
cp++;
|
Loading…
Reference in New Issue