Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Sep 2023 10:23:27 GMT
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 89f83f209590 - main - misc/hxtools: update the port to the latest version 20230411
Message-ID:  <202309151023.38FANRAQ023428@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=89f83f2095909d219f3cb142aadabd75e8d13a1e

commit 89f83f2095909d219f3cb142aadabd75e8d13a1e
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2023-09-15 10:22:16 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2023-09-15 10:22:16 +0000

    misc/hxtools: update the port to the latest version 20230411
    
    - COMPAT_PROC is now respected when accessing linprocfs(5) on
      FreeBSD which allows us to drop all corresponding patches;
      while /compat/linux is sensible default, follow ${LINUXBASE}
    - checkbrack program had been rewritten from Perl to C++, but
      still listed on the `dist_bin_SCRIPTS' (notified upstream)
    - Unfortunately, one of the useful utilities, cctypeinfo, had
      been removed as the author believes that all those strange
      exotic architectures are practically irrelevant now due to
      architecture consolidation in the market :(
    
    Reported by:    portscout
---
 misc/hxtools/Makefile                              |  11 +-
 misc/hxtools/distinfo                              |   6 +-
 misc/hxtools/files/patch-sadmin_hxnetload          |  23 -----
 misc/hxtools/files/patch-sadmin_ofl.c              |  57 ----------
 misc/hxtools/files/patch-sadmin_pmap__dirty        |  32 ------
 .../files/patch-sadmin_proc__iomem__count.c        |  20 ----
 misc/hxtools/files/patch-sadmin_psthreads.c        |  41 --------
 misc/hxtools/files/patch-sadmin_utmp__register.c   |  26 -----
 misc/hxtools/files/patch-sadmin_xfs__irecover.c    |  11 --
 misc/hxtools/files/patch-sdevel_cctypeinfo.c       |  30 ------
 misc/hxtools/files/patch-sdevel_paddrspacesize     |  11 --
 misc/hxtools/files/patch-smm_hcdplay.c             | 115 ---------------------
 misc/hxtools/files/patch-suser_sysinfo.c           |  33 ------
 misc/hxtools/pkg-plist                             |   2 -
 14 files changed, 12 insertions(+), 406 deletions(-)

diff --git a/misc/hxtools/Makefile b/misc/hxtools/Makefile
index 141f8a27162c..cbb097968c5d 100644
--- a/misc/hxtools/Makefile
+++ b/misc/hxtools/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	hxtools
-PORTVERSION=	20221120
+PORTVERSION=	20230411
 CATEGORIES=	misc
 MASTER_SITES=	http://inai.de/files/hxtools/
 
@@ -17,7 +17,7 @@ SHEBANG_FILES=	data/hxtools_bashrc.bash data/hxtools_profile.bash \
 		examples/git-deconstruct examples/rc4 sadmin/hxnetload \
 		sadmin/ldif-duplicate-attrs sadmin/ldif-leading-spaces \
 		sadmin/logontime sadmin/pmap_dirty sadmin/recursive_lower \
-		sadmin/vcsaview sdevel/checkbrack sdevel/cwdiff \
+		sadmin/vcsaview sdevel/cwdiff \
 		sdevel/diff2php sdevel/doxygen-kerneldoc-filter \
 		sdevel/git-author-stat sdevel/git-blame-stats \
 		sdevel/git-forest sdevel/git-revert-stats \
@@ -37,8 +37,15 @@ CONFLICTS_INSTALL=	grx psptoolchain-pspsdk-stage2 # bin/bin2c
 OPTIONS_DEFINE=	DOCS EXAMPLES
 
 post-patch:
+	@${REINPLACE_CMD} -e '/COMPAT_PROC/s,/compat/linux,${LINUXBASE},' \
+		${WRKSRC}/${CONFIGURE_SCRIPT}
+	@${REINPLACE_CMD} -E '/COMPAT_PROC ?=/s,"","${LINUXBASE}",' \
+		${WRKSRC}/sadmin/hxnetload \
+		${WRKSRC}/sadmin/pmap_dirty \
+		${WRKSRC}/sdevel/paddrspacesize
 	@${REINPLACE_CMD} -E 's,(/usr)?/bin,${LOCALBASE}/bin,g' \
 		${WRKSRC}/sadmin/su1
+	@${REINPLACE_CMD} -e '/checkbrack \\/d' ${WRKSRC}/sdevel/Makefile.in
 
 post-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
diff --git a/misc/hxtools/distinfo b/misc/hxtools/distinfo
index 9f8ed3b7e7dd..33b6c8dcae80 100644
--- a/misc/hxtools/distinfo
+++ b/misc/hxtools/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1668943703
-SHA256 (hxtools-20221120.tar.zst) = 8ab7337130cc55063a33964231bc5c7f253613da068b43555043ed06eef6d6d0
-SIZE (hxtools-20221120.tar.zst) = 202850
+TIMESTAMP = 1681210008
+SHA256 (hxtools-20230411.tar.zst) = 15266562661b339e054ab1e4f1830bd1ae43faf151401075e3b7d1fc788a10f7
+SIZE (hxtools-20230411.tar.zst) = 203185
diff --git a/misc/hxtools/files/patch-sadmin_hxnetload b/misc/hxtools/files/patch-sadmin_hxnetload
deleted file mode 100644
index e3853f6bc68f..000000000000
--- a/misc/hxtools/files/patch-sadmin_hxnetload
+++ /dev/null
@@ -1,23 +0,0 @@
---- sadmin/hxnetload.orig	2020-07-12 09:44:16 UTC
-+++ sadmin/hxnetload
-@@ -28,11 +28,11 @@ else
- fi;
- 
- while :; do
--	cat /proc/net/dev | grep " $1" | cut -f 2 -d:;
-+	cat /compat/linux/proc/net/dev | grep " $1" | cut -f 2 -d:;
- 	"$sleeper" $wait;
- done | perl -pe '$|=1;s/.*://' | while read rxcnt rxpkt c d e f g h txcnt txpkt; do
- 	if [ "$all" != "" ]; then
--		now="`cat /proc/uptime | cut -f 1 -d " " | sed s/"\."//g`";
-+		now="`cat /compat/linux/proc/uptime | cut -f 1 -d " " | sed s/"\."//g`";
- 		[ $[$now-$oldtm] -eq 0 ] && continue;
- 		rxbytes=$[($rxcnt-$oldrx)*100/($now-$oldtm)];
- 		rxint=$[$rxbytes/1024];
-@@ -48,5 +48,5 @@ done | perl -pe '$|=1;s/.*://' | while read rxcnt rxpk
- 	all=$[$rxcnt+$txcnt];
- 	oldrx=$rxcnt;
- 	oldtx=$txcnt;
--	oldtm="`cat /proc/uptime | cut -f 1 -d " " | sed s/"\."//g`";
-+	oldtm="`cat /compat/linux/proc/uptime | cut -f 1 -d " " | sed s/"\."//g`";
- done;
diff --git a/misc/hxtools/files/patch-sadmin_ofl.c b/misc/hxtools/files/patch-sadmin_ofl.c
deleted file mode 100644
index ba796a9ef620..000000000000
--- a/misc/hxtools/files/patch-sadmin_ofl.c
+++ /dev/null
@@ -1,57 +0,0 @@
---- sadmin/ofl.c.orig	2020-07-12 09:44:16 UTC
-+++ sadmin/ofl.c
-@@ -42,7 +42,7 @@ static const char *ofl_comm(pid_t pid, char *buf, size
- 	const char *p;
- 	ssize_t ret;
- 
--	snprintf(src, sizeof(src), "/proc/%u/exe", (unsigned int)pid);
-+	snprintf(src, sizeof(src), "/compat/linux/proc/%u/exe", (unsigned int)pid);
- 	ret = readlink(src, dst, sizeof(dst) - 1);
- 	if (ret < 0) {
- 		*buf = '\0';
-@@ -227,7 +227,7 @@ static bool ofl(const char *mnt, unsigned int signum)
- 	char tmp[256];
- 	struct HXdir *dir;
- 
--	dir = HXdir_open("/proc");
-+	dir = HXdir_open("/compat/linux/proc");
- 	if (dir == NULL)
- 		return false;
- 	while ((de = HXdir_read(dir)) != NULL) {
-@@ -236,30 +236,30 @@ static bool ofl(const char *mnt, unsigned int signum)
- 		data.pid = strtoul(de, NULL, 0);
- 		if (data.pid == 0)
- 			continue;
--		snprintf(tmp, sizeof(tmp), "/proc/%s", de);
-+		snprintf(tmp, sizeof(tmp), "/compat/linux/proc/%s", de);
- 		if (lstat(tmp, &data.sb) < 0 || !S_ISDIR(data.sb.st_mode))
- 			continue;
- 
- 		/* Program map */
--		snprintf(tmp, sizeof(tmp), "/proc/%s/maps", de);
-+		snprintf(tmp, sizeof(tmp), "/compat/linux/proc/%s/maps", de);
- 		if (ofl_pmap(mnt, tmp, &data))
- 			continue;
- 
- 		/* Basic links */
- 		data.check = true;
--		snprintf(tmp, sizeof(tmp), "/proc/%s/root", de);
-+		snprintf(tmp, sizeof(tmp), "/compat/linux/proc/%s/root", de);
- 		if (ofl_one(mnt, tmp, &data))
- 			continue;
--		snprintf(tmp, sizeof(tmp), "/proc/%s/cwd", de);
-+		snprintf(tmp, sizeof(tmp), "/compat/linux/proc/%s/cwd", de);
- 		if (ofl_one(mnt, tmp, &data))
- 			continue;
--		snprintf(tmp, sizeof(tmp), "/proc/%s/exe", de);
-+		snprintf(tmp, sizeof(tmp), "/compat/linux/proc/%s/exe", de);
- 		if (ofl_one(mnt, tmp, &data))
- 			continue;
- 
- 		/* All file descriptors */
- 		data.check = false;
--		snprintf(tmp, sizeof(tmp), "/proc/%s/task", de);
-+		snprintf(tmp, sizeof(tmp), "/compat/linux/proc/%s/task", de);
- 		ofl_task(mnt, tmp, &data);
- 	}
- 
diff --git a/misc/hxtools/files/patch-sadmin_pmap__dirty b/misc/hxtools/files/patch-sadmin_pmap__dirty
deleted file mode 100644
index b546d6b07d70..000000000000
--- a/misc/hxtools/files/patch-sadmin_pmap__dirty
+++ /dev/null
@@ -1,32 +0,0 @@
---- sadmin/pmap_dirty.orig	2020-07-12 09:44:16 UTC
-+++ sadmin/pmap_dirty
-@@ -25,9 +25,9 @@ my %total_counter;
- 
- if (scalar(@ARGV) == 0) {
- 	@ARGV = sort { $a <=> $b } map {
--		$_ = ($_ =~ m{^/proc/(\d+)$})[0];
-+		$_ = ($_ =~ m{^/compat/linux/proc/(\d+)$})[0];
- 		(!defined($_) || $_ eq "") ? () : $_
--	} glob("/proc/*");
-+	} glob("/compat/linux/proc/*");
- }
- 
- &print_one();
-@@ -35,7 +35,7 @@ if (scalar(@ARGV) == 0) {
- foreach my $pid (@ARGV) {
- 	my $proc_name;
- 	my $fh;
--	open($fh, "< /proc/$pid/smaps");
-+	open($fh, "< /compat/linux/proc/$pid/smaps");
- 
- 	my %counter = (
- 		Private_Dirty => 0,
-@@ -50,7 +50,7 @@ foreach my $pid (@ARGV) {
- 	}
- 
- 	close $fh;
--	if (open($fh, "</proc/$pid/stat")) {
-+	if (open($fh, "</compat/linux/proc/$pid/stat")) {
- 		($proc_name) = (<$fh> =~ /^.*?\((.*)\)/);
- 		close $fh;
- 	}
diff --git a/misc/hxtools/files/patch-sadmin_proc__iomem__count.c b/misc/hxtools/files/patch-sadmin_proc__iomem__count.c
deleted file mode 100644
index efb1d317ad75..000000000000
--- a/misc/hxtools/files/patch-sadmin_proc__iomem__count.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- sadmin/proc_iomem_count.c.orig	2020-07-12 09:44:16 UTC
-+++ sadmin/proc_iomem_count.c
-@@ -17,7 +17,7 @@
- 
- static int main2(int argc, const char **argv)
- {
--	const char *file = "/proc/iomem";
-+	const char *file = "/compat/linux/proc/iomem";
- 	uint64_t start, end;
- 	hxmc_t *ln = NULL;
- 	char *e;
-@@ -28,7 +28,7 @@ static int main2(int argc, const char **argv)
- 
- 	fp = fopen(file, "r");
- 	if (fp == NULL) {
--		fprintf(stderr, "fopen: /proc/iomem: %s\n", strerror(errno));
-+		fprintf(stderr, "fopen: /compat/linux/proc/iomem: %s\n", strerror(errno));
- 		return EXIT_FAILURE;
- 	}
- 
diff --git a/misc/hxtools/files/patch-sadmin_psthreads.c b/misc/hxtools/files/patch-sadmin_psthreads.c
deleted file mode 100644
index 9aa30b98f957..000000000000
--- a/misc/hxtools/files/patch-sadmin_psthreads.c
+++ /dev/null
@@ -1,41 +0,0 @@
---- sadmin/psthreads.c.orig	2020-07-12 09:44:16 UTC
-+++ sadmin/psthreads.c
-@@ -141,15 +141,15 @@ static struct kps_proc_data *kps_proc_read_one(unsigne
- 	HXlist_init(&task->process_children);
- 	task->cmdlen = 0;
- 
--	snprintf(buf, sizeof(buf), "/proc/%u/cmdline", pid);
-+	snprintf(buf, sizeof(buf), "/compat/linux/proc/%u/cmdline", pid);
- 	if ((fd = open(buf, O_RDONLY)) >= 0)
- 		kps_read_cmdline(task, fd);
- 
--	snprintf(buf, sizeof(buf), "/proc/%u/status", pid);
-+	snprintf(buf, sizeof(buf), "/compat/linux/proc/%u/status", pid);
- 	if ((fp = fopen(buf, "r")) != NULL)
- 		kps_read_status(task, fp);
- 
--	snprintf(buf, sizeof(buf), "/proc/%u/stat", pid);
-+	snprintf(buf, sizeof(buf), "/compat/linux/proc/%u/stat", pid);
- 	if ((fp = fopen(buf, "r")) != NULL)
- 		kps_read_stat(task, fp);
- 
-@@ -162,8 +162,8 @@ static void kps_proc_read(struct HXmap *tree)
- 	char buf[64];
- 	struct HXdir *dproc, *dthr;
- 
--	if ((dproc = HXdir_open("/proc")) == NULL) {
--		fprintf(stderr, "Could not open /proc: %s\n", strerror(errno));
-+	if ((dproc = HXdir_open("/compat/linux/proc")) == NULL) {
-+		fprintf(stderr, "Could not open /compat/linux/proc: %s\n", strerror(errno));
- 		return;
- 	}
- 
-@@ -175,7 +175,7 @@ static void kps_proc_read(struct HXmap *tree)
- 		if (end == dentry || *end != '\0')
- 			continue;
- 
--		snprintf(buf, sizeof(buf), "/proc/%u/task", tgid);
-+		snprintf(buf, sizeof(buf), "/compat/linux/proc/%u/task", tgid);
- 		if ((dthr = HXdir_open(buf)) == NULL) {
- 			fprintf(stderr, "Could not open %s: %s\n", buf, strerror(errno));
- 			continue;
diff --git a/misc/hxtools/files/patch-sadmin_utmp__register.c b/misc/hxtools/files/patch-sadmin_utmp__register.c
index 4d5ca49d61a9..69f0ca9dfee2 100644
--- a/misc/hxtools/files/patch-sadmin_utmp__register.c
+++ b/misc/hxtools/files/patch-sadmin_utmp__register.c
@@ -22,29 +22,3 @@
  		HXOPT_AUTOHELP,
  		HXOPT_TABLEEND,
  	};
-@@ -181,8 +185,10 @@ static int main2(int argc, const char **argv)
- 			setutxent();
- 			pututxline(&entry);
- 		}
-+#if 0
- 		if (Opt.op_wtmp)
- 			updwtmpx(Opt.fwtmp, &entry);
-+#endif
- 		if (Opt.op_lastlog)
- 			update_lastlog(Opt.flastlog, &entry);
- 	}
-@@ -193,11 +199,13 @@ static int main2(int argc, const char **argv)
- 			setutxent();
- 			pututxline(&entry);
- 		}
-+#if 0
- 		if (Opt.op_wtmp)
- 			updwtmpx(Opt.fwtmp, &entry);
-+#endif
- 	}
- 
--	endutent();
-+	endutxent();
- 	return EXIT_SUCCESS;
- }
- 
diff --git a/misc/hxtools/files/patch-sadmin_xfs__irecover.c b/misc/hxtools/files/patch-sadmin_xfs__irecover.c
deleted file mode 100644
index 7e764c15b06a..000000000000
--- a/misc/hxtools/files/patch-sadmin_xfs__irecover.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- sadmin/xfs_irecover.c.orig	2020-07-12 09:44:16 UTC
-+++ sadmin/xfs_irecover.c
-@@ -42,7 +42,7 @@
- #include <libHX/proc.h>
- #include <libHX/string.h>
- #include <arpa/inet.h>
--#include <linux/types.h>
-+#include <infiniband/types.h>
- 
- struct work_info {
- 	char *device;
diff --git a/misc/hxtools/files/patch-sdevel_cctypeinfo.c b/misc/hxtools/files/patch-sdevel_cctypeinfo.c
deleted file mode 100644
index cc05e4f7035c..000000000000
--- a/misc/hxtools/files/patch-sdevel_cctypeinfo.c
+++ /dev/null
@@ -1,30 +0,0 @@
---- sdevel/cctypeinfo.c.orig	2020-07-12 09:44:16 UTC
-+++ sdevel/cctypeinfo.c
-@@ -6,6 +6,7 @@
-  *	modify it under the terms of the WTF Public License version 2 or
-  *	(at your option) any later version.
-  */
-+#include <sys/socket.h>
- #include <stdint.h>
- #include <stdio.h>
- #include <stdlib.h>
-@@ -61,9 +62,6 @@ p(intptr_t);
- p(wchar_t);
- p(size_t);
- p(off_t);
--#ifdef HAVE_LOFF_T
--p(loff_t)
--#endif
- p(uint8_t);
- p(uint16_t);
- p(uint32_t);
-@@ -98,9 +96,6 @@ int main(void)
- 	t(size_t);
- 	t(wchar_t);
- 	t(off_t);
--#ifdef HAVE_LOFF_T
--	t(loff_t);
--#endif
- 	t(uint8_t);
- 	t(uint16_t);
- 	t(uint32_t);
diff --git a/misc/hxtools/files/patch-sdevel_paddrspacesize b/misc/hxtools/files/patch-sdevel_paddrspacesize
deleted file mode 100644
index 35151c5d0833..000000000000
--- a/misc/hxtools/files/patch-sdevel_paddrspacesize
+++ /dev/null
@@ -1,11 +0,0 @@
---- sdevel/paddrspacesize.orig	2020-07-12 09:44:16 UTC
-+++ sdevel/paddrspacesize
-@@ -18,7 +18,7 @@ foreach my $line (@list) {
- 	my($pid, $reset) = ($line =~ /^\s*(\d+)\s+(.*)/);
- 	my $bitness = 0;
- 
--	if (!open(FH, "</proc/$pid/maps")) {
-+	if (!open(FH, "</compat/linux/proc/$pid/maps")) {
- 		next;
- 	}
- 
diff --git a/misc/hxtools/files/patch-smm_hcdplay.c b/misc/hxtools/files/patch-smm_hcdplay.c
deleted file mode 100644
index 4ff3c2fb8510..000000000000
--- a/misc/hxtools/files/patch-smm_hcdplay.c
+++ /dev/null
@@ -1,115 +0,0 @@
---- smm/hcdplay.c.orig	2020-07-12 09:44:16 UTC
-+++ smm/hcdplay.c
-@@ -15,16 +15,18 @@
- #include <unistd.h>
- #include <libHX/option.h>
- #include <sys/ioctl.h>
--#include <linux/cdrom.h>
--#define DEFAULT_ROM "/dev/sr0"
-+#include <sys/cdio.h>
-+#define DEFAULT_ROM "/dev/cd0"
- 
- static char *cdev;
- static unsigned int dump_toc, do_start, do_pause, do_resume;
--static unsigned int do_play, do_stop, do_eject;
-+static unsigned int do_play, do_stop, do_eject, do_close;
- 
- static bool cdp_get_options(int *argc, const char ***argv)
- {
- 	static const struct HXoption option_table[] = {
-+		{.sh = 'C', .ln = "close",  .type = HXTYPE_NONE, .ptr = &do_close,
-+		 .help = "Close the CD-ROM"},
- 		{.sh = 'D', .ln = "device", .type = HXTYPE_STRING, .ptr = &cdev,
- 		 .help = "CD-ROM device path", .htyp = "FILE"},
- 		{.sh = 'E', .ln = "eject",  .type = HXTYPE_NONE, .ptr = &do_eject,
-@@ -56,7 +58,7 @@ static bool cdp_get_options(int *argc, const char ***a
- 
- int main(int argc, const char **argv)
- {
--	struct cdrom_tochdr toc;
-+	struct ioc_toc_header toc;
- 	int fd;
- 
- 	if (!cdp_get_options(&argc, &argv))
-@@ -69,38 +71,57 @@ int main(int argc, const char **argv)
- 		return EXIT_FAILURE;
- 	}
- 
--	if (ioctl(fd, CDROMREADTOCHDR, &toc) < 0) {
--		perror("ioctl CDROMREADTOCHDR");
-+	/*
-+	 * Ejecting and closing the CD-ROM tray does not require reading
-+	 * of the TOC header first (at least on FreeBSD).
-+	 */
-+	if (do_eject) {
-+		(void)ioctl(fd, CDIOCALLOW);
-+		if (ioctl(fd, CDIOCEJECT) < 0)
-+			perror("ioctl CDIOCEJECT");
-+		/*
-+		 * It is pointless to do anything after CD-ROM had been
-+		 * ejected, so exit early.
-+		 */
-+		goto done;
-+	}
-+	if (do_close) {
-+		(void)ioctl(fd, CDIOCALLOW);
-+		if (ioctl(fd, CDIOCCLOSE) < 0)
-+			perror("ioctl CDIOCCLOSE");
-+	}
-+	if (ioctl(fd, CDIOREADTOCHEADER, &toc) < 0) {
-+		perror("ioctl CDIOREADTOCHEADER");
- 		return EXIT_FAILURE;
- 	}
- 	if (dump_toc)
--		printf("Tracks: %u-%u\n", toc.cdth_trk0, toc.cdth_trk1);
-+		printf("Tracks: %u-%u\n", toc.starting_track, toc.ending_track);
- 	if (do_start)
--		if (ioctl(fd, CDROMSTART) < 0)
--			perror("ioctl CDROMSTART");
-+		if (ioctl(fd, CDIOCSTART) < 0)
-+			perror("ioctl CDIOCSTART");
- 	if (do_pause)
--		if (ioctl(fd, CDROMPAUSE) < 0)
--			perror("ioctl CDROMPAUSE");
-+		if (ioctl(fd, CDIOCPAUSE) < 0)
-+			perror("ioctl CDIOCPAUSE");
- 	if (do_resume)
--		if (ioctl(fd, CDROMRESUME) < 0)
--			perror("ioctl CDROMRESUME");
-+		if (ioctl(fd, CDIOCRESUME) < 0)
-+			perror("ioctl CDIOCRESUME");
- 	if (do_play) {
--		struct cdrom_ti t;
--		t.cdti_trk0 = (argc >= 2) ? strtoul(argv[1], NULL, 0) :
--		              toc.cdth_trk0;
--		t.cdti_trk1 = (argc >= 3) ? strtoul(argv[2], NULL, 0) :
--		              toc.cdth_trk1;
--		t.cdti_ind0 = 0;
--		t.cdti_ind1 = 0;
--		if (ioctl(fd, CDROMPLAYTRKIND, &t) < 0)
--			perror("ioctl CDROMPLAYTRKIND");
-+		struct ioc_play_track t;
-+		t.start_track = (argc >= 2) ? strtoul(argv[1], NULL, 0) :
-+		              toc.starting_track;
-+		t.end_track = (argc >= 3) ? strtoul(argv[2], NULL, 0) :
-+		              toc.ending_track;
-+		t.start_index = 1;
-+		t.end_index = 1;
-+		if (ioctl(fd, CDIOCPLAYTRACKS, &t) < 0)
-+			perror("ioctl CDIOCPLAYTRACKS");
- 	}
--	if (do_stop)
--		if (ioctl(fd, CDROMSTOP) < 0)
--			perror("ioctl CDROMSTOP");
--	if (do_eject)
--		if (ioctl(fd, CDROMEJECT) < 0)
--			perror("ioctl CDROMEJECT");
-+	if (do_stop) {
-+		if (ioctl(fd, CDIOCSTOP) < 0)
-+			perror("ioctl CDIOCSTOP");
-+		(void)ioctl(fd, CDIOCALLOW);
-+	}
-+ done:
- 	close(fd);
- 	return EXIT_SUCCESS;
- }
diff --git a/misc/hxtools/files/patch-suser_sysinfo.c b/misc/hxtools/files/patch-suser_sysinfo.c
deleted file mode 100644
index 9142b92fbb44..000000000000
--- a/misc/hxtools/files/patch-suser_sysinfo.c
+++ /dev/null
@@ -1,33 +0,0 @@
---- suser/sysinfo.c.orig	2020-07-12 09:44:16 UTC
-+++ suser/sysinfo.c
-@@ -48,9 +48,9 @@ struct sy_block {
- 	unsigned int display_width, display_height;
- };
- 
--static const char *sy_osrelease_file = "/etc/os-release";
--static const char *sy_cpuinfo_file = "/proc/cpuinfo";
--static const char sysfs_cpu_dir[] = "/sys/devices/system/cpu";
-+static const char *sy_osrelease_file = "/var/run/os-release";
-+static const char *sy_cpuinfo_file = "/compat/linux/proc/cpuinfo";
-+static const char sysfs_cpu_dir[] = "/compat/linux/sys/devices/system/cpu";
- static unsigned int sy_verbose;
- 
- static void sy_num_cpu_threads(struct sy_block *sib)
-@@ -190,7 +190,7 @@ static void sy_loadavg(struct sy_block *sib)
- {
- 	double avg5, avg15;
- 	unsigned int run;
--	FILE *fp = fopen("/proc/loadavg", "r");
-+	FILE *fp = fopen("/compat/linux/proc/loadavg", "r");
- 
- 	if (fp == NULL)
- 		return;
-@@ -202,7 +202,7 @@ static void sy_loadavg(struct sy_block *sib)
- static void sy_memory(struct sy_block *sib)
- {
- 	unsigned long long mem_free = 0, mem_buf = 0, mem_cac = 0, mem_shm = 0;
--	FILE *fp = fopen("/proc/meminfo", "r");
-+	FILE *fp = fopen("/compat/linux/proc/meminfo", "r");
- 	hxmc_t *line = NULL;
- 	char *key, *value;
- 
diff --git a/misc/hxtools/pkg-plist b/misc/hxtools/pkg-plist
index 2264ae3210a5..c0b0f84c441f 100644
--- a/misc/hxtools/pkg-plist
+++ b/misc/hxtools/pkg-plist
@@ -41,7 +41,6 @@ bin/tailhex
 bin/wktimer
 bin/xcp
 etc/hxloginpref.conf
-libexec/hxtools/cctypeinfo
 libexec/hxtools/clock_info
 libexec/hxtools/diff2php
 libexec/hxtools/doxygen-kerneldoc-filter
@@ -63,7 +62,6 @@ libexec/hxtools/vcsaview
 man/man1/aumeta.1.gz
 man/man1/bin2c.1.gz
 man/man1/bsvplay.1.gz
-man/man1/cctypeinfo.1.gz
 man/man1/checkbrack.1.gz
 man/man1/clock_info.1.gz
 man/man1/cwdiff.1.gz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202309151023.38FANRAQ023428>