]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Implement {io,admin}-passthru commands.
authorWarner Losh <imp@FreeBSD.org>
Tue, 16 Jul 2019 17:24:25 +0000 (17:24 +0000)
committerWarner Losh <imp@FreeBSD.org>
Tue, 16 Jul 2019 17:24:25 +0000 (17:24 +0000)
commit7d88a2f89e4658990b5f4c7e36e6f5c62e5b76bc
tree19b8dda35b2a7d68c1f3dfd433d44600f9cbdaa8
parentf634b4c1be662a3abd518e82b5090ee1d5209c48
Implement {io,admin}-passthru commands.

These are mostly compatible with Linux, with three exceptions.
1. We don't do metadata segment stuff. Our passthrough interface
   doesn't cope. The code is there, but generates an error.
2. Linux lets you specify a namespace ID for the command. We current
   do not: we get ours from the namespace device, or pass in a generic
   one. Generally, this will lead to the same command, but FreeBSD's
   is safer since you can't specify the wrong id.
3. --show-command outputs to stderr instead of stdout so you can both
   see your command, and capture its output with a simple redirect.

Differential Revision: https://reviews.freebsd.org/D19296
sbin/nvmecontrol/passthru.c [new file with mode: 0644]