aboutsummaryrefslogtreecommitdiff
path: root/sbin/nvmecontrol/comnd.c
Commit message (Collapse)AuthorAgeFilesLines
* Make use of the getlocalbase() function for run-time adjustment of theStefan Eßer2020-11-181-1/+1
| | | | | | | | | | | | | | | | | | local software base directory, as committed in SVN rev. 367813. The pkg and mailwrapper programs used the LOCALBASE environment variable for this purpose and this functionality is preserved by getlocalbase(). After this change, the value of the user.localbase sysctl variable is used if present (and not overridden in the environment). The nvmecontrol program gains support of a dynamic path to its plugin directory with this update. Differential Revision: https://reviews.freebsd.org/D27237 Notes: svn path=/head/; revision=367816
* Revert the whole getlocalbase() set of changes while a different design isScott Long2020-11-151-1/+1
| | | | | | | hashed out. Notes: svn path=/head/; revision=367711
* Replace hardcoded references to _PATH_LOCALBASE with calls to getlocalbase.3Scott Long2020-11-141-1/+1
| | | | | | | Reviewed by: imp, se Notes: svn path=/head/; revision=367687
* Improve nvmecontrol error reporting.Alexander Motin2020-11-131-6/+7
| | | | | | | | MFC after: 1 week Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=367630
* Assume all the short args have optional args so allocate space for theWarner Losh2019-09-111-1/+1
| | | | | | | | | | ':'. It's slightly wasteful, but much easier (and the savings in bytes at runtime would be tiny, but the code to do it larger). Submitted by: Sebastian Huber Notes: svn path=/head/; revision=352212
* Fix usage printing for nested subcommands.Alexander Motin2019-07-311-2/+15
| | | | | | | | | Instead of `nvmecontrol create` should be `nvmecontrol ns create`, etc. MFC after: 2 weeks Notes: svn path=/head/; revision=350461
* Fix several related coverity issues:Warner Losh2019-07-241-1/+5
| | | | | | | | | | Make sure to always free shortopts and lopts when returning. Fix minor logic bug to guard against NULLs properly. CID: 1403654, 1403656, 1403658 Notes: svn path=/head/; revision=350309
* Create generic command / arg parsing routinesWarner Losh2019-07-161-0/+326
Create a set of routines and structures to hold the data for the args for a command. Use them to generate help and to parse args. Convert all the current commands over to the new format. "comnd" is a hat-tip to the TOPS-20 %COMND JSYS that (very) loosely inspired much of the subsequent command line notions in the industry, but this is far simpler (the %COMND man page is longer than this code) and not in the kernel... Also, it implements today's de-facto command [verb]+ [opts]* [args]* format rather than the old, archaic TOPS-20 command format :) This is a snapshot of a work in progress to get the nvme passthru stuff committed. In time it will become a private library and used by some other programs in the tree that conform to the above pattern. Differential Revision: https://reviews.freebsd.org/D19296 Notes: svn path=/head/; revision=350057