Trust uboot's device list only if it does not look suspicious.
[AROS.git] / compiler / autoinit / commandname.c
blob30d7c958a98495bc6431d0d5c0b8ea1331ed4323
1 #include <exec/tasks.h>
2 #include <proto/exec.h>
4 #include "autoinit_intern.h"
6 /*
7 * We can be called several times.
8 * In order to avoid unneeded hassle we cache our result here.
9 */
10 static char *_CommandName = NULL;
12 char *___get_command_name(struct ExecBase *SysBase)
14 if (!_CommandName)
16 struct Task *me = FindTask(NULL);
19 * TODO:
20 * In AROS task's name always corresponds to command name.
21 * However at least on AmigaOS v3 this is not true for CLI
22 * proceses. In this case process name is still 'Shell process',
23 * and command name is placed in cli_CommandName
24 * P.S. I may remember something wrong - Pavel Fedin
26 _CommandName = me->tc_Node.ln_Name;
29 return _CommandName;