History log of /freebsd-current/lib/libdevinfo/devinfo.c
Revision Date Author Comments
# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# 32592d86 04-Aug-2020 Eric van Gyzen <vangyzen@FreeBSD.org>

devinfo: fix memory leak on error paths

Refactor to create devinfo_free_dev(). Call it to plug a memory leak
on two error paths in devinfo_init_devices().

Reported by: Coverity
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon


# cf72c10f 30-May-2018 Warner Losh <imp@FreeBSD.org>

Update to device enumeration protocol 2

The new protocol from the kernel encodes things as a string table,
extract it into fields. strdup the strings, and free them when we're
done.

Differential Revision: https://reviews.freebsd.org/D15629


# 92376fa7 30-May-2018 Warner Losh <imp@FreeBSD.org>

Sanity check the return from the kernel.

We should be getting back as many bytes as we asked for, and we
don't handle shortages at all, so just reject anything that's
not right.

Differential Revision: https://reviews.freebsd.org/D15629


# 51a9cfbf 30-May-2018 Warner Losh <imp@FreeBSD.org>

There's no meaningful errno when there's a version mismatch, so use
warnx. Also, report the mis-matched versions.


# 41ec95c4 20-Dec-2017 Warner Losh <imp@FreeBSD.org>

Bump number that's an insane number of devices from 1,000 to 10,000. I
have access to machines that are pushing 400 devices. When 1,000 was
selected, it was rare to get even 40 or 50 devices. Bump the limit by
10x to keep up with the times.

Sponsored by: Netflix


# 5e53a4f9 25-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

lib: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 60cd5863 17-Jul-2006 Stefan Farfeleder <stefanf@FreeBSD.org>

Make the variadic macro debug() comply to C99.


# afc7f38c 22-Jun-2005 John Baldwin <jhb@FreeBSD.org>

Clear devinfo_generation in devinfo_free() since we are freeing all of the
cached state. Otherwise, a subsequent call to devinfo_init() would succeed
without reading the device tree from the kernel thinking that the cached
state was up to date since the generation count was the same. However,
since the cached state was actually free'd, attempts to examine the tree
after the second devinfo_init() would fail.

Reported by: Juho Vuori juho dot vuori at kepa dot fi
Submitted by: Stefan Farfeleder stefan at fafoe dot narf dot at
Approved by: re (dwhite)
MFC after: 1 week


# 109a0e6b 19-May-2005 Philippe Charnier <charnier@FreeBSD.org>

Remove unused variables. Whitespace cleaning.


# 2af3af27 01-Mar-2005 Stefan Farfeleder <stefanf@FreeBSD.org>

Fix typo in a comment.


# e60b9f51 22-Sep-2004 Stefan Farfeleder <stefanf@FreeBSD.org>

Prefer C99's __func__ over GCC's __FUNCTION__.


# 43832002 19-Sep-2002 Warner Losh <imp@FreeBSD.org>

Expose the new kernel data structures to libdevinfo:
o Added dd_pnpinfo, dd_location, dd_devflags, dd_flags and dd_state
o Copy/initialize these as necessary.
o Document the changes to the interface in devinfo.3.


# e67f5b9f 16-Sep-2001 Matthew Dillon <dillon@FreeBSD.org>

Implement __FBSDID()


# e495c560 10-Aug-2001 John Baldwin <jhb@FreeBSD.org>

Include string.h for the strlen() prototype to quiet a warning.


# a2e6df29 19-Apr-2001 Mike Smith <msmith@FreeBSD.org>

This is the Device Information Library, libdevinfo.

The devinfo library provides access to the kernel's internal device
hierarchy and to the I/O resource manager. The library uses a
sysctl(9) interface to obtain a snapshot of the kernel's state which
is then made available to the application.