Created attachment 238015 [details] patch to fix command-line args and fix unit display This patch updates the port to fix the fact that the code calls XtAppInitialize() which eats the command-line args and so causes ps(1) to not display them. The command-line args are now saved before and restored after the call to XtAppInitialize(). Also, correct the display of the units of total byte counts to show as "B", "kB", "GB" etc, rather than the imprecise/incorrect "b", "k", "G" etc. I have updated all the patches using "make makepatch" which has caused files/patch-ioctl_stats.c to be renamed to files/patch-ioctl__stat.c.
Triage: ready for someone to commit? We have the flag, maintainer-approval+
Created attachment 239432 [details] patch to fix %d expansion in -iformat and -oformat arguments Since this hasn't yet been committed, here is an additional patch to fix another bug. Currently, if "%d" appears in an -iformat or -oformat <fmt> argument, it _replaces_ the contents of the buffer so far. It should _append_ to the buffer as do all the other format specifiers. The second patch fixes this. The patches in both attachments need applying.
Created attachment 239447 [details] patch to fix command-line args, unit display and %d expansion On discovery that this app divides bit counts by 1024 and not 1000, further change units to kiB, MiB, Gib. While here, to simplify things, I am combining both these patches into one.
(In reply to J.R. Oldroyd from comment #3) Your patch fails to apply: error: git apply: bad git-diff - inconsistent old filename on line 50
Created attachment 239490 [details] patch to fix command-line args, unit display and %d expansion Updated the patch to use same paths now.
Created attachment 239491 [details] patch to fix command-line args, unit display and %d expansion And also fix one additional path in a rename command.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=82f36772565dc3bcf17661df5ac8360c85fe426c commit 82f36772565dc3bcf17661df5ac8360c85fe426c Author: J.R. Oldroyd <fbsd@opal.com> AuthorDate: 2023-01-16 16:56:29 +0000 Commit: Mikael Urankar <mikael@FreeBSD.org> CommitDate: 2023-01-16 17:33:55 +0000 net/pload: Fix command-line args and unit display. This patch updates the port to fix the fact that the code calls XtAppInitialize() which eats the command-line args and so causes ps(1) to not display them. The command-line args are now saved before and restored after the call to XtAppInitialize(). Also, correct the display of the units of total byte counts to show as "B", "kB", "GB" etc, rather than the imprecise/incorrect "b", "k", "G" etc. PR: 267710 Approved by: J.R. Oldroyd (maintainer) net/pload/Makefile | 2 +- net/pload/files/patch-Imakefile | 31 ++--- .../{patch-ioctl_stats.c => patch-ioctl__stat.c} | 10 +- net/pload/files/patch-pload.c | 147 +++++++++++---------- net/pload/files/patch-pload.man | 8 +- 5 files changed, 95 insertions(+), 103 deletions(-)
Thanks!
A commit in branch 2023Q1 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=bb77c48ee538332836ef00f03257316b65fac316 commit bb77c48ee538332836ef00f03257316b65fac316 Author: J.R. Oldroyd <fbsd@opal.com> AuthorDate: 2023-01-16 16:56:29 +0000 Commit: Mikael Urankar <mikael@FreeBSD.org> CommitDate: 2023-01-16 17:34:20 +0000 net/pload: Fix command-line args and unit display. This patch updates the port to fix the fact that the code calls XtAppInitialize() which eats the command-line args and so causes ps(1) to not display them. The command-line args are now saved before and restored after the call to XtAppInitialize(). Also, correct the display of the units of total byte counts to show as "B", "kB", "GB" etc, rather than the imprecise/incorrect "b", "k", "G" etc. PR: 267710 Approved by: J.R. Oldroyd (maintainer) (cherry picked from commit 82f36772565dc3bcf17661df5ac8360c85fe426c) net/pload/Makefile | 2 +- net/pload/files/patch-Imakefile | 31 ++--- .../{patch-ioctl_stats.c => patch-ioctl__stat.c} | 10 +- net/pload/files/patch-pload.c | 147 +++++++++++---------- net/pload/files/patch-pload.man | 8 +- 5 files changed, 95 insertions(+), 103 deletions(-)