summaryrefslogtreecommitdiffstats
path: root/lib/getopt.c
Commit message (Collapse)AuthorAgeFilesLines
* getopt: Add pr_fmtSascha Hauer2018-11-271-0/+1
| | | | | | To give the debug output more context. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* getopt: Add support for '--' to stop option parsingSascha Hauer2016-07-251-0/+5
| | | | | | | | In some cases when commands have optional arguments it is necessary to explicitly stop option parsing after the last nonpositonal option. Add support for '--' to accomplish this as done in getopt(3) aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* getopt: change optstring to const char*Alexander Aring2013-02-111-2/+2
| | | | | | | | | Change getopt optstring parameter type to const char *. Also change type to const char * of tmp variable which pointed to optstring. This will only handle readonly. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-171-3/+0
| | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* getopt: save and restore contextSascha Hauer2012-02-271-2/+20
| | | | | | | | | | | | execute_command is the single point where commands are executed and thus a new getopt context is needed. currently we call getopt_reset here to reset the context. This breaks though when a command tries to run a command itself by calling execute_command or run_command. In this case we have to store the context and restore it afterwards. The same is necessary in builtin_getopt. Currently noone does this so this one shouldn't fix a bug, but merely allows us to do such things later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* getopt: turn commented out printf into debug()Sascha Hauer2012-02-271-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Export symbols printf and the ones needed for getoptSascha Hauer2007-10-011-0/+8
|
* svn_rev_643Sascha Hauer2007-07-051-0/+143
structure cleanup