Date: Tue, 6 May 2025 22:02:17 GMT From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 9166666cc262 - main - devinfo: Restructure function in prep for libxo Message-ID: <202505062202.546M2Hu9042339@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9166666cc26218b4e82f5b390705e1f5f09b1af5 commit 9166666cc26218b4e82f5b390705e1f5f09b1af5 Author: ktullavik <ktullavik@gmail.com> AuthorDate: 2024-10-17 18:32:46 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2025-05-06 22:01:46 +0000 devinfo: Restructure function in prep for libxo No functional change intended. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1480 --- usr.sbin/devinfo/devinfo.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index 7fbb34277d47..686f4a09f73c 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -213,7 +213,8 @@ print_rman_resource(struct devinfo_res *res, void *arg __unused) struct devinfo_rman *rman; rman_res_t end; bool hexmode; - + + dev = devinfo_handle_to_device(res->dr_device); rman = devinfo_handle_to_rman(res->dr_rman); hexmode = (rman->dm_size > 1000) || (rman->dm_size == 0); end = res->dr_start + res->dr_size - 1; @@ -221,13 +222,15 @@ print_rman_resource(struct devinfo_res *res, void *arg __unused) printf(" "); if (hexmode) { - printf("0x%jx", res->dr_start); if (res->dr_size > 1) - printf("-0x%jx", end); + printf("0x%jx-0x%jx", res->dr_start, end); + else + printf("0x%jx", res->dr_start); } else { - printf("%ju", res->dr_start); if (res->dr_size > 1) - printf("-%ju", end); + printf("%ju-%ju", res->dr_start, end); + else + printf("%ju", res->dr_start); } dev = devinfo_handle_to_device(res->dr_device);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202505062202.546M2Hu9042339>