diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 2025xxxx: libdevinfo bumped to version 7 +OLD_LIBS+=lib/libdevinfo.so.6 + # 20250123: Remove gvinum(8) OLD_FILES+=sbin/gvinum OLD_FILES+=usr/share/man/man8/gvinum.8.gz diff --git a/lib/libdevinfo/Makefile b/lib/libdevinfo/Makefile --- a/lib/libdevinfo/Makefile +++ b/lib/libdevinfo/Makefile @@ -14,7 +14,7 @@ MLINKS+=devinfo.3 devinfo_foreach_rman_resource.3 MLINKS+=devinfo.3 devinfo_foreach_rman.3 -SHLIB_MAJOR= 6 +SHLIB_MAJOR= 7 WARNS?= 3 diff --git a/lib/libdevinfo/devinfo.h b/lib/libdevinfo/devinfo.h --- a/lib/libdevinfo/devinfo.h +++ b/lib/libdevinfo/devinfo.h @@ -34,7 +34,7 @@ #include typedef __uintptr_t devinfo_handle_t; -#define DEVINFO_ROOT_DEVICE ((devinfo_handle_t)0) +#define DEVINFO_ROOT_DEVICE ((devinfo_handle_t)1) typedef enum device_state devinfo_state_t; diff --git a/lib/libdevinfo/devinfo.c b/lib/libdevinfo/devinfo.c --- a/lib/libdevinfo/devinfo.c +++ b/lib/libdevinfo/devinfo.c @@ -420,7 +420,7 @@ */ if (handle == DEVINFO_ROOT_DEVICE) { TAILQ_FOREACH(dd, &devinfo_dev, dd_link) - if (dd->dd_dev.dd_parent == DEVINFO_ROOT_DEVICE) + if (dd->dd_dev.dd_parent == 0) return(&dd->dd_dev); return(NULL); }