The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=e3dd8ed77b4e7d8fda12ec80b91d89e8460b64f8
commit e3dd8ed77b4e7d8fda12ec80b91d89e8460b64f8 Author: Vladimir Kondratyev <w...@freebsd.org> AuthorDate: 2021-01-20 23:06:16 +0000 Commit: Vladimir Kondratyev <w...@freebsd.org> CommitDate: 2021-01-20 23:06:16 +0000 devinfo sysctl handler: Do not write zero-length strings in to sbuf twice This fixes missing PnPinfo and location strings in devinfo(8) output for devices with no attached drivers. --- sys/kern/subr_bus.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 78d07796659c..ecd6c9685e36 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -5528,18 +5528,12 @@ sysctl_devices(SYSCTL_HANDLER_ARGS) sbuf_new(&sb, udev->dv_fields, sizeof(udev->dv_fields), SBUF_FIXEDLEN); if (dev->nameunit != NULL) sbuf_cat(&sb, dev->nameunit); - else - sbuf_putc(&sb, '\0'); sbuf_putc(&sb, '\0'); if (dev->desc != NULL) sbuf_cat(&sb, dev->desc); - else - sbuf_putc(&sb, '\0'); sbuf_putc(&sb, '\0'); if (dev->driver != NULL) sbuf_cat(&sb, dev->driver->name); - else - sbuf_putc(&sb, '\0'); sbuf_putc(&sb, '\0'); bus_child_pnpinfo_sb(dev, &sb); sbuf_putc(&sb, '\0'); _______________________________________________ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"