summaryrefslogtreecommitdiffstats
path: root/arch/sandbox/Makefile
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2010-09-08 21:23:07 +0200
committerRobert Schwebel <r.schwebel@pengutronix.de>2010-09-21 06:37:23 +0200
commit038163e9df3d3ee5bf27de42978554b8313e7524 (patch)
treea043e0fc65858d60d9d275aba213d015f916bdd2 /arch/sandbox/Makefile
parent48357cbe6b1d2744b5e5ce8c212093a8dadcabbd (diff)
downloadbarebox-038163e9df3d3ee5bf27de42978554b8313e7524.tar.gz
barebox-038163e9df3d3ee5bf27de42978554b8313e7524.tar.xz
sandbox: add longopts and fix segfault
Until now, the main function of the sandbox port wants to use the libc getopt(), but as we have a getopt() implementation in barebox as well, it is silently used instead. This works in the usual case, but if an error occurs (i.e. by using an unknown argument) in getopt(), the implementation tries to write to the console, which is not initialized and thus breaks with a null pointer exception. This patch changes the main function to use getopt_long() instead of getopt(). This makes us use the implementation in glibc and while being there, we get long options, which makes us look more professional... Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Diffstat (limited to 'arch/sandbox/Makefile')
0 files changed, 0 insertions, 0 deletions