]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r350058 (by imp): Implement {io,admin}-passthru commands.
authorAlexander Motin <mav@FreeBSD.org>
Mon, 12 Aug 2019 18:50:57 +0000 (18:50 +0000)
committerAlexander Motin <mav@FreeBSD.org>
Mon, 12 Aug 2019 18:50:57 +0000 (18:50 +0000)
commitcc8b9becad302e122132e1557b1e477d2894a659
tree37a050ad1ce1a53ee59765958f3eaf606c5a692b
parent518eff0cb16fd3308b119f36ed0bc27b4440f028
MFC r350058 (by imp): 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.
sbin/nvmecontrol/passthru.c [new file with mode: 0644]