Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package procenv for openSUSE:Factory checked in at 2021-06-14 23:11:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/procenv (Old) and /work/SRC/openSUSE:Factory/.procenv.new.32437 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "procenv" Mon Jun 14 23:11:10 2021 rev:4 rq:899894 version:0.56 Changes: -------- --- /work/SRC/openSUSE:Factory/procenv/procenv.changes 2021-04-10 15:28:52.426484077 +0200 +++ /work/SRC/openSUSE:Factory/.procenv.new.32437/procenv.changes 2021-06-14 23:11:38.996811655 +0200 @@ -1,0 +2,9 @@ +Mon Jun 14 07:33:24 UTC 2021 - Michael Vetter <[email protected]> + +- Update to 0.56: + * tidy: compact and align structs for memory size and performance. + * darwin: Add memory details (total, free, wired, unused, + active and inactive memory). + * doc improvements. + +------------------------------------------------------------------- Old: ---- procenv-0.55.tar.gz New: ---- procenv-0.56.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ procenv.spec ++++++ --- /var/tmp/diff_new_pack.5yroLP/_old 2021-06-14 23:11:39.436812449 +0200 +++ /var/tmp/diff_new_pack.5yroLP/_new 2021-06-14 23:11:39.440812457 +0200 @@ -18,7 +18,7 @@ Name: procenv -Version: 0.55 +Version: 0.56 Release: 0 Summary: Process Environment Dump Tool License: GPL-3.0-or-later ++++++ procenv-0.55.tar.gz -> procenv-0.56.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/.github/workflows/build.yaml new/procenv-0.56/.github/workflows/build.yaml --- old/procenv-0.55/.github/workflows/build.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/procenv-0.56/.github/workflows/build.yaml 2021-06-13 10:20:28.000000000 +0200 @@ -0,0 +1,30 @@ +name: Build procenv in GitHub Actions build environment + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Install dependencies + run: | + sudo apt update -qq + sudo apt install -y \ + automake \ + autopoint \ + check \ + expat \ + libapparmor-dev \ + libcap-dev \ + libnuma-dev \ + libselinux1-dev + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Build + run: | + autoreconf -fi + ./configure + make -j4 + make check diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/Makefile.in new/procenv-0.56/Makefile.in --- old/procenv-0.55/Makefile.in 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/Makefile.in 2021-06-13 10:20:28.000000000 +0200 @@ -334,6 +334,7 @@ procenv_platform = @procenv_platform@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/NEWS new/procenv-0.56/NEWS --- old/procenv-0.55/NEWS 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/NEWS 2021-06-13 10:20:28.000000000 +0200 @@ -1,3 +1,10 @@ +0.56 2021-06-13 + + * tidy: compact and align structs for memory size and performance. + * darwin: Add memory details (total, free, wired, unused, active and + inactive memory). + * doc improvements. + 0.55 2021-04-08 * Documentation improvements. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/README.md new/procenv-0.56/README.md --- old/procenv-0.55/README.md 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/README.md 2021-06-13 10:20:28.000000000 +0200 @@ -6,6 +6,33 @@ # `procenv` +* [Demo](#demo) +* [Overview](#overview) +* [Install](#install) + * [CentOS](#centos) + * [Debian and Ubuntu](#debian-and-ubuntu) + * [Fedora](#fedora) + * [FreeBSD](#freebsd) + * [Gentoo](#gentoo) + * [SUSE](#suse) + * [Build from source](#build-from-source) +* [Results](#results) + * [Debian build environment](#debian-build-environment) + * [`buildd` environment](#buildd-environment) + * [Debian `autopkgtest` (DEP-8) environment](#debian-autopkgtest-dep-8-environment) + * [Fedora build environment](#fedora-build-environment) + * [Gentoo build environment](#gentoo-build-environment) + * [Open Build Service (OBS) build environment](#open-build-service-obs-build-environment) + * [Semaphore-CI build environment](#semaphore-ci-build-environment) + * [Travis-CI build environment](#travis-ci-build-environment) + * [Ubuntu build environment](#ubuntu-build-environment) +* [Porting](#porting) +* [References](#references) +* [Author](#author) +* [Home Page](#home-page) + +## Demo + [](https://asciinema.org/a/118278?autoplay=1) ## Overview @@ -42,6 +69,95 @@ `procenv` shows these too since they are obviously meant to be queryable by applications. +## Install + +### CentOS + +- Enable EPEL repository. +- Install: + + ```bash + $ sudo dnf -y install procenv + ``` + +### Debian and Ubuntu + +```bash +$ sudo apt -y install procenv +``` + +### Fedora + +```bash +$ sudo dnf -y install procenv +``` + +### FreeBSD + +To install the binary package: + +```bash +$ sudo pkg -y install procenv +``` + +To install the port: + +```bash +$ cd /usr/ports/sysutils/procenv +$ sudo make install clean +``` + +### Gentoo + +```bash +$ sudo emerge sys-process/procenv +``` + +### SUSE + +```bash +$ sudo zypper install -y procenv +``` + +### Build from source + +1. Install dependencies + + | Platform | Usage | Required? | Dependency | Rationale | + |-|-|-|-|-| + | common | build | yes | GCC or Clang compiler | For building the code | + | common | build | yes | GNU Autoconf | For configuring the source package | + | common | build | yes | GNU Automake | For generating makefiles | + | common | build | yes | GNU Make | For building the code | + | common | build | yes | `pkgconf` / `pkg-config` | For configuring build dependencies | + | common | test | optional | Check | For running unit tests | + | common | test | optional | Expat | For validating XML output | + | common | test | optional | GNU Groff | For checking man page documentation | + | Linux | build | optional | `libapparmor` development package | For capabilities details | + | Linux | build | optional | `libcap` development package | For capabilities details | + | Linux | build | optional | `libnuma` development package | For NUMA memory details | + | Linux | build | optional | `libselinux` development package | For SELinux details | + | BSD | build | optional | `libsysinfo` package or port | For general memory details | + +1. Checkout the source code: + + ```bash + $ git clone https://github.com/jamesodhunt/procenv + $ cd procenv + ``` + +1. Configure and build: + + ```bash + $ autoreconf -fi && ./configure + $ make && make check && sudo make install + ``` + + > **Note:** + > + > For BSD systems, replace `make` with `gmake` above to ensure you run using + > GNU Make (BSD make will hang at the test stage!) + ## Results `procenv` is extremely useful for learning about the environment @@ -53,16 +169,25 @@ Select a link below and drill down to the build log to see the `procenv` output: -### Semaphore-CI +### Debian build environment -- https://semaphoreci.com/jamesodhunt/procenv - (Click "Passed", "Job #", then "`make check`" to see output). +#### `buildd` environment -### Travis-CI +- https://buildd.debian.org/status/package.php?p=procenv&suite=sid -- https://travis-ci.org/jamesodhunt/procenv +#### Debian `autopkgtest` (DEP-8) environment -### Open Build Service (OBS) +- https://ci.debian.net/packages/p/procenv/ + +### Fedora build environment + +- https://src.fedoraproject.org/rpms/procenv/ + +### Gentoo build environment + +- https://packages.gentoo.org/packages/sys-process/procenv + +### Open Build Service (OBS) build environment - https://build.opensuse.org/package/show/home:jamesodhunt:procenv/procenv @@ -76,25 +201,16 @@ Note that these packages are "bleeding edge" (generated directly from the GitHub repository). -### Debian - -#### `buildd` environment - -- https://buildd.debian.org/status/package.php?p=procenv&suite=sid - -#### Debian `autopkgtest` (DEP-8) environment - -- https://ci.debian.net/packages/p/procenv/ - -### Fedora +### Semaphore-CI build environment -- https://src.fedoraproject.org/rpms/procenv/ +- https://semaphoreci.com/jamesodhunt/procenv + (Click "Passed", "Job #", then "`make check`" to see output). -### Gentoo +### Travis-CI build environment -- https://packages.gentoo.org/packages/sys-process/procenv +- https://travis-ci.org/jamesodhunt/procenv -### Ubuntu +### Ubuntu build environment - https://launchpad.net/ubuntu/+source/procenv diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/configure new/procenv-0.56/configure --- old/procenv-0.55/configure 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/configure 2021-06-13 10:20:28.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for procenv 0.55. +# Generated by GNU Autoconf 2.69 for procenv 0.56. # # Report bugs to <[email protected]>. # @@ -582,8 +582,8 @@ # Identity of this package. PACKAGE_NAME='procenv' PACKAGE_TARNAME='procenv' -PACKAGE_VERSION='0.55' -PACKAGE_STRING='procenv 0.55' +PACKAGE_VERSION='0.56' +PACKAGE_STRING='procenv 0.56' PACKAGE_BUGREPORT='[email protected]' PACKAGE_URL='https://github.com/jamesodhunt/procenv' @@ -738,6 +738,7 @@ docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -823,6 +824,7 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1075,6 +1077,15 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1212,7 +1223,7 @@ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1325,7 +1336,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures procenv 0.55 to adapt to many kinds of systems. +\`configure' configures procenv 0.56 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1365,6 +1376,7 @@ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1396,7 +1408,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of procenv 0.55:";; + short | recursive ) echo "Configuration of procenv 0.56:";; esac cat <<\_ACEOF @@ -1513,7 +1525,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -procenv configure 0.55 +procenv configure 0.56 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1938,7 +1950,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by procenv $as_me 0.55, which was +It was created by procenv $as_me 0.56, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2323,7 +2335,7 @@ -PROCENV_VERSION=0.55 +PROCENV_VERSION=0.56 # Expand $ac_aux_dir to an absolute path. @@ -6071,7 +6083,7 @@ # Define the identity of the package. PACKAGE='procenv' - VERSION='0.55' + VERSION='0.56' cat >>confdefs.h <<_ACEOF @@ -7155,7 +7167,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by procenv $as_me 0.55, which was +This file was extended by procenv $as_me 0.56, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7222,7 +7234,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -procenv config.status 0.55 +procenv config.status 0.56 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/configure.ac new/procenv-0.56/configure.ac --- old/procenv-0.55/configure.ac 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/configure.ac 2021-06-13 10:20:28.000000000 +0200 @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -m4_define([procenv_version], [0.55]) +m4_define([procenv_version], [0.56]) AC_INIT(procenv,[procenv_version],[[email protected]],,[https://github.com/jamesodhunt/procenv]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/procenv.spec new/procenv-0.56/procenv.spec --- old/procenv-0.55/procenv.spec 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/procenv.spec 2021-06-13 10:20:28.000000000 +0200 @@ -1,12 +1,12 @@ Name: procenv -Version: 0.55 +Version: 0.56 Release: 1%{?dist} Summary: Utility to show process environment Group: Applications/System License: GPLv3+ URL: https://github.com/jamesodhunt/procenv -Source0: https://github.com/jamesodhunt/procenv/archive/0.55.tar.gz +Source0: https://github.com/jamesodhunt/procenv/archive/0.56.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # fixme: should be autoconf >= 2.68, but Fedora packages or alien'ed dpkg diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/src/Makefile.in new/procenv-0.56/src/Makefile.in --- old/procenv-0.55/src/Makefile.in 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/src/Makefile.in 2021-06-13 10:20:28.000000000 +0200 @@ -377,6 +377,7 @@ procenv_platform = @procenv_platform@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -435,9 +436,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Makefile + $(AUTOMAKE) --foreign src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/src/output.c new/procenv-0.56/src/output.c --- old/procenv-0.55/src/output.c 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/src/output.c 2021-06-13 10:20:28.000000000 +0200 @@ -91,32 +91,32 @@ int output_fd = -1; static struct procenv_map output_map[] = { - { OUTPUT_FILE , "file" }, - { OUTPUT_STDERR , "stderr" }, - { OUTPUT_STDOUT , "stdout" }, - { OUTPUT_SYSLOG , "syslog" }, - { OUTPUT_TERM , "terminal" }, + { "file" , OUTPUT_FILE }, + { "stderr" , OUTPUT_STDERR }, + { "stdout" , OUTPUT_STDOUT }, + { "syslog" , OUTPUT_SYSLOG }, + { "terminal" , OUTPUT_TERM }, - { 0 , NULL } + { NULL , 0 } }; static struct procenv_map output_format_map[] = { - { OUTPUT_FORMAT_TEXT , "text" }, - { OUTPUT_FORMAT_CRUMB , "crumb" }, - { OUTPUT_FORMAT_JSON , "json" }, - { OUTPUT_FORMAT_XML , "xml" }, + { "text" , OUTPUT_FORMAT_TEXT }, + { "crumb" , OUTPUT_FORMAT_CRUMB }, + { "json" , OUTPUT_FORMAT_JSON }, + { "xml" , OUTPUT_FORMAT_XML }, - { 0 , NULL } + { NULL , 0 } }; typedef struct translate_map_entry { - wchar_t from; wchar_t *to; + wchar_t from; } TranslateMapEntry; typedef struct translate_table { - OutputFormat output_format; TranslateMapEntry map[TRANSLATE_MAP_ENTRIES]; + OutputFormat output_format; } TranslateTable; /* @@ -124,32 +124,32 @@ */ static TranslateTable translate_table[] = { { - OUTPUT_FORMAT_XML, { - { L'\'', L"'" }, - { L'"', L""" }, - { L'&', L"&" }, - { L'<', L"<" }, - { L'>', L">" }, + { L"'" , L'\'' }, + { L""" , L'"' }, + { L"&" , L'&' }, + { L"<" , L'<' }, + { L">" , L'>' }, /* terminator */ - { L'\0', NULL } - } + { NULL , L'\0' } + }, + OUTPUT_FORMAT_XML }, { - OUTPUT_FORMAT_JSON, { - { L'"', L"\\\"" }, - { L'\\', L"\\\\" }, + { L"\\\"", L'"' }, + { L"\\\\", L'\\' }, /* XXX: the hack! */ - { L'\0', NULL }, - { L'\0', NULL }, - { L'\0', NULL }, + { NULL, L'\0' }, + { NULL, L'\0' }, + { NULL, L'\0' }, /* terminator */ - { L'\0', NULL } - } + { NULL , L'\0' } + }, + OUTPUT_FORMAT_JSON }, }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/src/platform/darwin/platform-darwin.h new/procenv-0.56/src/platform/darwin/platform-darwin.h --- old/procenv-0.55/src/platform/darwin/platform-darwin.h 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/src/platform/darwin/platform-darwin.h 2021-06-13 10:20:28.000000000 +0200 @@ -1,5 +1,5 @@ /*-------------------------------------------------------------------- - * Copyright ?? 2016 James Hunt <[email protected]>. + * Copyright ?? 2016-2021 James Hunt <[email protected]>. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,6 +22,8 @@ #include "platform.h" #include "util.h" +#include <mach/mach.h> + #define mib_len(mib) ((sizeof (mib) / sizeof(*mib)) - 1) #endif /* _PROCENV_PLATFORM_DARWIN_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/src/platform/darwin/platform.c new/procenv-0.56/src/platform/darwin/platform.c --- old/procenv-0.55/src/platform/darwin/platform.c 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/src/platform/darwin/platform.c 2021-06-13 10:20:28.000000000 +0200 @@ -1,5 +1,5 @@ /*-------------------------------------------------------------------- - * Copyright ?? 2016 James Hunt <[email protected]>. + * Copyright ?? 2016-2021 James Hunt <[email protected]>. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -60,32 +60,32 @@ #endif #if defined (SIGPOLL) - { SIGPOLL, "SIGPOLL|SIGEMT" }, + { "SIGPOLL|SIGEMT" , SIGPOLL }, #elif defined (SIGEMT) - { SIGEMT, "SIGPOLL|SIGEMT" }, + { "SIGPOLL|SIGEMT", SIGEMT }, #endif - { SIGCHLD, "SIGCHLD|SIGCLD" }, - { SIGABRT, "SIGABRT|SIGIOT" }, + { "SIGCHLD|SIGCLD", SIGCHLD }, + { "SIGABRT|SIGIOT", SIGABRT }, - { 0, NULL }, + { NULL , 0 }, }; static struct procenv_map64 mntopt_map_darwin[] = { - { MNT_ASYNC , "asynchronous" }, - { MNT_EXPORTED , "NFS-exported" }, - { MNT_LOCAL , "local" }, - { MNT_MULTILABEL , "multilabel" }, - { MNT_NOATIME , "noatime" }, - { MNT_NOEXEC , "noexec" }, - { MNT_NOSUID , "nosuid" }, - { MNT_QUOTA , "with quotas" }, - { MNT_RDONLY , "read-only" }, - { MNT_SYNCHRONOUS , "synchronous" }, - { MNT_UNION , "union" }, + { "asynchronous" , MNT_ASYNC }, + { "NFS-exported" , MNT_EXPORTED }, + { "local" , MNT_LOCAL }, + { "multilabel" , MNT_MULTILABEL }, + { "noatime" , MNT_NOATIME }, + { "noexec" , MNT_NOEXEC }, + { "nosuid" , MNT_NOSUID }, + { "with-quotas" , MNT_QUOTA }, + { "read-only" , MNT_RDONLY }, + { "synchronous" , MNT_SYNCHRONOUS }, + { "union" , MNT_UNION }, - { 0, NULL } + { NULL , 0} }; static struct procenv_map if_flag_map_darwin[] = { @@ -101,7 +101,7 @@ mk_map_entry (IFF_SIMPLEX), mk_map_entry (IFF_MULTICAST), - { 0, NULL } + { NULL , 0 } }; static void @@ -118,22 +118,27 @@ static bool get_time_darwin (struct timespec *ts) { - clock_serv_t cs; - mach_timespec_t mts; + clock_serv_t cs; + mach_timespec_t mts; - // FIXME: can this fail? - host_get_clock_service (mach_host_self(), CALENDAR_CLOCK, &cs); + kern_return_t ret; - // FIXME: can this fail? - clock_get_time (cs, &mts); + ret = host_get_clock_service (mach_host_self(), CALENDAR_CLOCK, &cs); + if (ret != KERN_SUCCESS) { + return 1; + } + + ret = clock_get_time (cs, &mts); + if (ret != KERN_SUCCESS) { + return 1; + } - // FIXME: can this fail? - mach_port_deallocate (mach_task_self(), cs); + mach_port_deallocate (mach_task_self(), cs); - ts->tv_sec = mts.tv_sec; - ts->tv_nsec = mts.tv_nsec; + ts->tv_sec = mts.tv_sec; + ts->tv_nsec = mts.tv_nsec; - return 0; + return 0; } static void @@ -250,27 +255,104 @@ show_mounts_generic_bsd (what, mntopt_map_darwin); } +static void +show_memory_darwin (void) +{ + size_t bytes; + size_t len = sizeof(bytes); + int ret; + + size_t vm_page_size; + size_t total_ram; + size_t used_ram; + size_t free_ram; + + bytes = 0; + ret = sysctlbyname("hw.memsize", &bytes, &len, NULL, 0); + if (ret < 0) { + return; + } + + total_ram = bytes; + + /*------------------------------*/ + + bytes = 0; + ret = sysctlbyname("vm.pagesize", &bytes, &len, NULL, 0); + if (ret < 0) { + return; + } + + vm_page_size = bytes; + + /*------------------------------*/ + + bytes = 0; + ret = sysctlbyname("vm.page_free_count", &bytes, &len, NULL, 0); + if (ret < 0) { + return; + } + + used_ram = (bytes * vm_page_size); + free_ram = total_ram - used_ram; + + /*------------------------------*/ + + mach_msg_type_number_t count; + vm_statistics_data_t stats = { 0 }; + + count = HOST_VM_INFO_COUNT; + ret = host_statistics(mach_host_self(), + HOST_VM_INFO, + (host_info_t)&stats, + &count); + if (ret != KERN_SUCCESS) { + return; + } + + size_t unused_vm_bytes = stats.free_count * vm_page_size; + size_t active_bytes = stats.active_count * vm_page_size; + size_t inactive_bytes = stats.inactive_count * vm_page_size; + size_t wired_bytes = stats.wire_count * vm_page_size; + + /*------------------------------*/ + + section_open ("ram"); + + mk_mem_section ("total", total_ram); + mk_mem_section ("free", free_ram); + mk_mem_section ("wired", wired_bytes); + mk_mem_section ("unused", unused_vm_bytes); + mk_mem_section ("active", active_bytes); + mk_mem_section ("inactive", inactive_bytes); + + section_close (); + + /*------------------------------*/ +} + /* Darwin lacks: * * - cpusets and cpu affinities. - * */ struct procenv_ops platform_ops = { - .driver = PROCENV_SET_DRIVER (darwin), + .driver = PROCENV_SET_DRIVER (darwin), + + .signal_map = signal_map_darwin, + .if_flag_map = if_flag_map_darwin, + + .get_time = get_time_darwin, + .get_kernel_bits = get_kernel_bits_generic, + .get_mtu = get_mtu_generic, + + .handle_proc_branch = handle_proc_branch_darwin, - .signal_map = signal_map_darwin, - .if_flag_map = if_flag_map_darwin, + .show_confstrs = show_confstrs_generic, + .show_cpu = show_cpu_darwin, + .show_fds = show_fds_generic, + .show_mounts = show_mounts_darwin, + .show_rlimits = show_rlimits_generic, - .get_time = get_time_darwin, - .get_kernel_bits = get_kernel_bits_generic, - .get_mtu = get_mtu_generic, - - .handle_proc_branch = handle_proc_branch_darwin, - - .show_confstrs = show_confstrs_generic, - .show_cpu = show_cpu_darwin, - .show_fds = show_fds_generic, - .show_mounts = show_mounts_darwin, - .show_rlimits = show_rlimits_generic, + .handle_memory = show_memory_darwin, }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/src/platform/freebsd/platform.c new/procenv-0.56/src/platform/freebsd/platform.c --- old/procenv-0.55/src/platform/freebsd/platform.c 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/src/platform/freebsd/platform.c 2021-06-13 10:20:28.000000000 +0200 @@ -24,7 +24,7 @@ mk_map_entry (SIGALRM), mk_map_entry (SIGBUS), - { SIGCHLD, "SIGCHLD|SIGCLD" }, + { "SIGCHLD|SIGCLD", SIGCHLD }, mk_map_entry (SIGCONT), mk_map_entry (SIGFPE), @@ -56,35 +56,35 @@ mk_map_entry (SIGTHR), mk_map_entry (SIGLIBRT), - { 0, NULL }, + { NULL, 0 }, }; static struct procenv_map64 mntopt_map_freebsd[] = { - { MNT_ACLS , "acls" }, - { MNT_ASYNC , "asynchronous" }, - { MNT_EXPORTED , "NFS-exported" }, - { MNT_GJOURNAL , "gjournal" }, - { MNT_LOCAL , "local" }, - { MNT_MULTILABEL , "multilabel" }, - { MNT_NFS4ACLS , "nfsv4acls" }, - { MNT_NOATIME , "noatime" }, - { MNT_NOCLUSTERR , "noclusterr" }, - { MNT_NOCLUSTERW , "noclusterw" }, - { MNT_NOEXEC , "noexec" }, - { MNT_NOSUID , "nosuid" }, - { MNT_NOSYMFOLLOW , "nosymfollow" }, - { MNT_QUOTA , "with quotas" }, - { MNT_RDONLY , "read-only" }, - { MNT_SOFTDEP , "soft-updates" }, - { MNT_SUIDDIR , "suiddir" }, + { "acls" , MNT_ACLS }, + { "asynchronous" , MNT_ASYNC }, + { "NFS-exported" , MNT_EXPORTED }, + { "gjournal" , MNT_GJOURNAL }, + { "local" , MNT_LOCAL }, + { "multilabel" , MNT_MULTILABEL }, + { "nfsv4acls" , MNT_NFS4ACLS }, + { "noatime" , MNT_NOATIME }, + { "noclusterr" , MNT_NOCLUSTERR }, + { "noclusterw" , MNT_NOCLUSTERW }, + { "noexec" , MNT_NOEXEC }, + { "nosuid" , MNT_NOSUID }, + { "nosymfollow" , MNT_NOSYMFOLLOW }, + { "with-quotas" , MNT_QUOTA }, + { "read-only" , MNT_RDONLY }, + { "soft-updates" , MNT_SOFTDEP }, + { "suiddir" , MNT_SUIDDIR }, #if defined (MNT_SUJ) - { MNT_SUJ , "journaled soft-updates" }, + { "journaled-soft-updates" , MNT_SUJ }, #endif - { MNT_SYNCHRONOUS , "synchronous" }, - { MNT_UNION , "union" }, + { "synchronous" , MNT_SYNCHRONOUS }, + { "union" , MNT_UNION }, - { 0, NULL } + { NULL, 0 }, }; static struct procenv_map if_flag_map_freebsd[] = { @@ -100,7 +100,7 @@ mk_map_entry (IFF_SIMPLEX), mk_map_entry (IFF_MULTICAST), - { 0, NULL } + { NULL, 0 }, }; static void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/src/platform/hurd/platform.c new/procenv-0.56/src/platform/hurd/platform.c --- old/procenv-0.55/src/platform/hurd/platform.c 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/src/platform/hurd/platform.c 2021-06-13 10:20:28.000000000 +0200 @@ -24,7 +24,7 @@ mk_map_entry (SIGALRM), mk_map_entry (SIGBUS), - { SIGCHLD, "SIGCHLD|SIGCLD" }, + { "SIGCHLD|SIGCLD", SIGCHLD }, mk_map_entry (SIGCONT), mk_map_entry (SIGFPE), @@ -55,7 +55,7 @@ mk_map_entry (SIGINFO), mk_map_entry (SIGLOST), - { 0, NULL }, + { NULL, 0 }, }; static struct procenv_map if_flag_map_hurd[] = { @@ -70,7 +70,7 @@ mk_map_entry (IFF_ALLMULTI), mk_map_entry (IFF_MULTICAST), - { 0, NULL } + { NULL, 0 }, }; struct procenv_ops platform_ops = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/src/platform/linux/platform.c new/procenv-0.56/src/platform/linux/platform.c --- old/procenv-0.55/src/platform/linux/platform.c 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/src/platform/linux/platform.c 2021-06-13 10:20:28.000000000 +0200 @@ -29,7 +29,7 @@ mk_map_entry (SCHED_IDLE), #endif - { 0, NULL } + { NULL, 0 } }; static struct procenv_map signal_map_linux[] = { @@ -38,7 +38,7 @@ mk_map_entry (SIGALRM), mk_map_entry (SIGBUS), - { SIGCHLD, "SIGCHLD|SIGCLD" }, + {"SIGCHLD|SIGCLD", SIGCHLD}, mk_map_entry (SIGCONT), mk_map_entry (SIGFPE), @@ -60,7 +60,7 @@ mk_map_entry (SIGIO), mk_map_entry (SIGIOT), - {SIGPOLL, "SIGPOLL|SIGIO" }, + {"SIGPOLL|SIGIO", SIGPOLL}, mk_map_entry (SIGPROF), @@ -80,7 +80,7 @@ mk_map_entry (SIGXCPU), mk_map_entry (SIGXFSZ), - { 0, NULL }, + { NULL, 0 }, }; static struct procenv_map if_flag_map_linux[] = { @@ -106,7 +106,7 @@ mk_map_entry (IFF_ECHO), #endif - { 0, NULL } + { NULL, 0 } }; static struct procenv_map if_extended_flag_map_linux[] = { @@ -134,7 +134,7 @@ #if defined (IFF_ISATAP) mk_map_entry (IFF_ISATAP), #endif - { 0, NULL } + { NULL, 0 } }; static struct procenv_map personality_map_linux[] = { @@ -164,7 +164,7 @@ mk_map_entry (PER_OSF4), mk_map_entry (PER_HPUX), - { 0, NULL } + { NULL, 0 } }; static struct procenv_map personality_flag_map_linux[] = { @@ -196,7 +196,7 @@ mk_map_entry (WHOLE_SECONDS), #endif - { 0, NULL } + { NULL, 0 } }; /* lifted from include/linux/ioprio.h since not available in libc */ @@ -226,7 +226,7 @@ mk_map_entry (IOPRIO_CLASS_IDLE), mk_map_entry (IOPRIO_CLASS_NORMAL), - { 0, NULL } + { NULL, 0 } }; static char * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/src/platform/netbsd/platform.c new/procenv-0.56/src/platform/netbsd/platform.c --- old/procenv-0.55/src/platform/netbsd/platform.c 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/src/platform/netbsd/platform.c 2021-06-13 10:20:28.000000000 +0200 @@ -24,7 +24,7 @@ mk_map_entry (SIGALRM), mk_map_entry (SIGBUS), - { SIGCHLD, "SIGCHLD|SIGCLD" }, + { "SIGCHLD|SIGCLD", SIGCHLD }, mk_map_entry (SIGCONT), mk_map_entry (SIGFPE), @@ -54,27 +54,27 @@ mk_map_entry (SIGINFO), mk_map_entry (SIGPWR), - { 0, NULL }, + { NULL, 0 }, }; static struct procenv_map64 mntopt_map[] = { - { MNT_ASYNC , "asynchronous" }, - { MNT_EXPORTED , "NFS-exported" }, - { MNT_LOCAL , "local" }, - { MNT_NOATIME , "noatime" }, - { MNT_NOEXEC , "noexec" }, - { MNT_NOSUID , "nosuid" }, - { MNT_QUOTA , "with quotas" }, - { MNT_RDONLY , "read-only" }, - { MNT_SOFTDEP , "soft-updates" }, + { "asynchronous" , MNT_ASYNC }, + { "NFS-exported" , MNT_EXPORTED }, + { "local" , MNT_LOCAL }, + { "noatime" , MNT_NOATIME }, + { "noexec" , MNT_NOEXEC }, + { "nosuid" , MNT_NOSUID }, + { "with-quotas" , MNT_QUOTA }, + { "read-only" , MNT_RDONLY }, + { "soft-updates", MNT_SOFTDEP }, #if defined (MNT_SUJ) - { MNT_SUJ , "journaled soft-updates" }, + { "journaled-soft-updates", MNT_SUJ }, #endif - { MNT_SYNCHRONOUS , "synchronous" }, - { MNT_UNION , "union" }, + { "synchronous", MNT_SYNCHRONOUS }, + { "union", MNT_UNION }, - { 0, NULL } + { NULL, 0 }, }; static struct procenv_map if_flag_map_netbsd[] = { @@ -90,7 +90,7 @@ mk_map_entry (IFF_SIMPLEX), mk_map_entry (IFF_MULTICAST), - { 0, NULL } + { NULL, 0 }, }; static void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/src/platform/openbsd/platform.c new/procenv-0.56/src/platform/openbsd/platform.c --- old/procenv-0.55/src/platform/openbsd/platform.c 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/src/platform/openbsd/platform.c 2021-06-13 10:20:28.000000000 +0200 @@ -25,7 +25,7 @@ mk_map_entry (SIGALRM), mk_map_entry (SIGBUS), - { SIGCHLD, "SIGCHLD|SIGCLD" }, + { "SIGCHLD|SIGCLD", SIGCHLD }, mk_map_entry (SIGCONT), mk_map_entry (SIGFPE), @@ -56,26 +56,27 @@ mk_map_entry (SIGTHR), mk_map_entry (SIGTTOU), - { 0, NULL }, + { NULL, 0 }, }; static struct procenv_map64 mntopt_map[] = { - { MNT_ASYNC , "asynchronous" }, - { MNT_EXPORTED , "NFS-exported" }, - { MNT_LOCAL , "local" }, - { MNT_NOATIME , "noatime" }, - { MNT_NOEXEC , "noexec" }, - { MNT_NOSUID , "nosuid" }, - { MNT_QUOTA , "with quotas" }, - { MNT_RDONLY , "read-only" }, - { MNT_SOFTDEP , "soft-updates" }, + { "asynchronous" , MNT_ASYNC }, + { "NFS-exported" , MNT_EXPORTED }, + { "local" , MNT_LOCAL }, + { "noatime" , MNT_NOATIME }, + { "noexec" , MNT_NOEXEC }, + { "nosuid" , MNT_NOSUID }, + { "with-quotas" , MNT_QUOTA }, + { "read-only" , MNT_RDONLY }, + { "synchronous" , MNT_SYNCHRONOUS }, + #if defined (MNT_SUJ) - { MNT_SUJ , "journaled soft-updates" }, + { "journaled-soft-updates", MNT_SUJ }, #endif - { MNT_SYNCHRONOUS , "synchronous" }, + { "synchronous", MNT_SYNCHRONOUS }, - { 0, NULL } + { NULL, 0 } }; static struct procenv_map if_flag_map_openbsd[] = { @@ -91,7 +92,7 @@ mk_map_entry (IFF_SIMPLEX), mk_map_entry (IFF_MULTICAST), - { 0, NULL } + { NULL, 0 } }; static void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/src/platform/platform-generic.c new/procenv-0.56/src/platform/platform-generic.c --- old/procenv-0.55/src/platform/platform-generic.c 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/src/platform/platform-generic.c 2021-06-13 10:20:28.000000000 +0200 @@ -538,48 +538,6 @@ free (cpu_list); } -#define PROCENV_KB (1024) -#define PROCENV_MB (1024*PROCENV_KB) -#define PROCENV_GB (1024*PROCENV_MB) - -#if !defined (PROCENV_PLATFORM_HURD) - -static -void -show_human_size_entry (size_t value) -{ - double result; - char *units; - - if (value > PROCENV_GB) { - result = ((double)value/PROCENV_GB); - units = "GB"; - } else if (value > PROCENV_MB) { - result = ((double)value/PROCENV_MB); - units = "MB"; - } else if (value > PROCENV_KB) { - result = ((double)value/PROCENV_KB); - units = "KB"; - } else { - result = (double)value; - units = "bytes"; - } - - entry ("human", "%2.2f %s", - result, - units); -} - -#define mk_mem_section(name, value) \ -{ \ - section_open (name); \ - entry ("bytes", "%lu", value); \ - show_human_size_entry (value); \ - section_close (); \ -} - -#endif /* !PROCENV_PLATFORM_HURD */ - #if defined (PROCENV_PLATFORM_HURD) /* Although hurd has the "sys/sysinfo.h" header, it doesn't contain a @@ -744,6 +702,39 @@ #endif +#if !defined (PROCENV_PLATFORM_HURD) + +#define PROCENV_KB (1024) +#define PROCENV_MB (1024*PROCENV_KB) +#define PROCENV_GB (1024*PROCENV_MB) + +void +show_human_size_entry (size_t value) +{ + double result; + char *units; + + if (value > PROCENV_GB) { + result = ((double)value/PROCENV_GB); + units = "GB"; + } else if (value > PROCENV_MB) { + result = ((double)value/PROCENV_MB); + units = "MB"; + } else if (value > PROCENV_KB) { + result = ((double)value/PROCENV_KB); + units = "KB"; + } else { + result = (double)value; + units = "bytes"; + } + + entry ("human", "%2.2f %s", + result, + units); +} + +#endif /* !PROCENV_PLATFORM_HURD */ + #if defined (PROCENV_PLATFORM_BSD) || \ defined (PROCENV_PLATFORM_MINIX) || \ defined (PROCENV_PLATFORM_DARWIN) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/src/platform/platform-generic.h new/procenv-0.56/src/platform/platform-generic.h --- old/procenv-0.55/src/platform/platform-generic.h 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/src/platform/platform-generic.h 2021-06-13 10:20:28.000000000 +0200 @@ -25,6 +25,7 @@ void show_rlimits_generic (void); void show_confstrs_generic (void); long get_kernel_bits_generic (void); +void show_human_size_entry (size_t value); #if !defined (PROCENV_PLATFORM_MINIX) int get_mtu_generic (const struct ifaddrs *ifaddr); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/src/platform/unknown/platform.c new/procenv-0.56/src/platform/unknown/platform.c --- old/procenv-0.55/src/platform/unknown/platform.c 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/src/platform/unknown/platform.c 2021-06-13 10:20:28.000000000 +0200 @@ -24,7 +24,7 @@ mk_map_entry (SIGALRM), mk_map_entry (SIGBUS), - { SIGCHLD, "SIGCHLD|SIGCLD" }, + { "SIGCHLD|SIGCLD", SIGCHLD }, mk_map_entry (SIGCONT), @@ -76,7 +76,7 @@ mk_map_entry (SIGXCPU), mk_map_entry (SIGXFSZ), - { 0, NULL }, + { NULL, 0 }, }; struct procenv_ops platform_ops = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/src/platform.h new/procenv-0.56/src/platform.h --- old/procenv-0.55/src/platform.h 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/src/platform.h 2021-06-13 10:20:28.000000000 +0200 @@ -62,28 +62,29 @@ }; struct procenv_user { + struct passwd passwd; + char proc_name[PROCENV_PR_GET_NAME_LEN]; + char ctrl_terminal[L_ctermid]; + + char __padding[3]; + pid_t pid; pid_t ppid; pid_t sid; - char proc_name[PROCENV_PR_GET_NAME_LEN]; + char *login; pid_t pgroup; pid_t fg_pgroup; - char ctrl_terminal[L_ctermid]; int tty_fd; uid_t uid; uid_t euid; uid_t suid; - char *login; - gid_t gid; gid_t egid; gid_t sgid; - - struct passwd passwd; }; struct procenv_misc { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/src/procenv.c new/procenv-0.56/src/procenv.c --- old/procenv-0.55/src/procenv.c 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/src/procenv.c 2021-06-13 10:20:28.000000000 +0200 @@ -945,7 +945,7 @@ mk_sysconf_map_entry (_SC_XOPEN_XCU_VERSION), #endif - { 0, NULL } + { NULL , 0 } }; struct procenv_map locale_map[] = { @@ -976,7 +976,7 @@ #endif mk_map_entry (LC_TIME), - { 0, NULL } + { NULL , 0 } }; struct procenv_map thread_sched_policy_map[] = { @@ -1088,7 +1088,6 @@ show (" the data in a flattened format with each value on a separate line"); show (" preceded by all appropriate headings which are separated by the"); show (" current separator."); - show (""); } /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/src/procenv.h new/procenv-0.56/src/procenv.h --- old/procenv-0.55/src/procenv.h 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/src/procenv.h 2021-06-13 10:20:28.000000000 +0200 @@ -77,7 +77,10 @@ #include <sys/param.h> #include <sys/time.h> #include <sys/resource.h> + +#if !defined (PROCENV_PLATFORM_DARWIN) #include <sys/sysinfo.h> +#endif #include "util.h" #include "string-util.h" @@ -167,8 +170,10 @@ * - Added 'ambient' to --capabilities output. * VERSION 19: * - Added more details to --memory and new capabilities to --capabilities. + * VERSION 20: + * - More --memory details for Darwin. **/ -#define PROCENV_FORMAT_VERSION 19 +#define PROCENV_FORMAT_VERSION 20 #if defined (PROCENV_PLATFORM_LINUX) || defined (PROCENV_PLATFORM_HURD) @@ -260,10 +265,10 @@ } #define SPEED(s) \ - {s, #s } + {#s, s} #define mk_map_entry(s) \ - {s, #s } + {#s, s} #define show_confstr(s) \ { \ @@ -334,7 +339,7 @@ sysconf (s) #define mk_sysconf_map_entry(name) \ - {name, #name } + {#name, name } #define show_sizeof_type(type) \ entry (#type, "%lu byte%s", \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/src/types.h new/procenv-0.56/src/types.h --- old/procenv-0.55/src/types.h 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/src/types.h 2021-06-13 10:20:28.000000000 +0200 @@ -22,13 +22,13 @@ #include <stdint.h> struct procenv_map { - unsigned int num; const char *name; + unsigned int num; }; struct procenv_map64 { - uint64_t num; const char *name; + uint64_t num; }; #endif /* _PROCENV_TYPES_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/src/util.c new/procenv-0.56/src/util.c --- old/procenv-0.55/src/util.c 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/src/util.c 2021-06-13 10:20:28.000000000 +0200 @@ -27,8 +27,8 @@ struct baud_speed { - speed_t speed; char *name; + speed_t speed; }; /** @@ -276,7 +276,7 @@ SPEED (B230400), /* terminator */ - { 0, NULL } + { NULL, 0 } }; const char * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/procenv-0.55/src/util.h new/procenv-0.56/src/util.h --- old/procenv-0.55/src/util.h 2021-04-08 22:24:31.000000000 +0200 +++ new/procenv-0.56/src/util.h 2021-06-13 10:20:28.000000000 +0200 @@ -56,4 +56,16 @@ int is_console (int fd); #endif +#if !defined (PROCENV_PLATFORM_HURD) + +#define mk_mem_section(name, value) \ +{ \ + section_open (name); \ + entry ("bytes", "%lu", value); \ + show_human_size_entry (value); \ + section_close (); \ +} + +#endif /* !PROCENV_PLATFORM_HURD */ + #endif /* _PROCENV_UTIL_H */
