> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/man/man9/bus_child_pnpinfo.9.md).

# BUS\_CHILD\_PNPINFO.9

`BUS_CHILD_PNPINFO` — 从设备获取即插即用信息

## 名称

`BUS_CHILD_PNPINFO`

## 概要

```c
#include <sys/param.h>
#include <sys/bus.h>
#include <sys/sbuf.h>
```

```c
void
BUS_CHILD_PNPINFO(device_t dev, device_t child, struct sbuf *sb)
```

## 描述

`BUS_CHILD_PNPINFO` 方法返回关于 `child` 设备的标识信息。某些总线将此信息称为即插即用（pnp）详细信息。此信息是一系列 key=value 对。字符串必须格式化为以空格分隔的 key=value 对列表。名称只能包含字母数字字符、下划线（`_`）和连字符（`-`）。值可以包含任何非空白字符。包含空白的值可以用双引号（`"`）括起来。引号内的双引号和反斜杠可以用反斜杠（`\`）转义。

pnpinfo 定义为 `child` 设备的一系列特征，这些特征与所附加的驱动程序无关，但用于允许驱动程序认领设备。通常，即插即用信息编码了设备的制造商、型号以及一些关于设备的通用详细信息。按照惯例，仅报告该总线上的驱动程序用来决定是否接受该设备的通用信息。不报告设备运行所需但不能将其与其他设备广泛区分开来的其他配置信息（如缓存突发大小）。

## 参见

bus(9), [device(9)](/man/man9/device.9.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://book.bsdcn.org/man/man9/bus_child_pnpinfo.9.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
