Subversion Repositories HelenOS

Rev

Rev 3346 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3346 Rev 3809
Line 38... Line 38...
38
#include "cmds.h"
38
#include "cmds.h"
39
#include "builtin_aliases.h"
39
#include "builtin_aliases.h"
40
 
40
 
41
extern volatile unsigned int cli_interactive;
41
extern volatile unsigned int cli_interactive;
42
 
42
 
43
int builtin_is_restricted(int pos)
-
 
44
{
-
 
45
    builtin_t *cmd = builtins;
-
 
46
    cmd += pos;
-
 
47
 
-
 
48
    if (cli_interactive && cmd->restricted <= 0)
-
 
49
        return 0;
-
 
50
    if (!cli_interactive && cmd->restricted >= 0)
-
 
51
        return 0;
-
 
52
 
-
 
53
    return 1;
-
 
54
}
-
 
55
 
-
 
56
int is_builtin(const char *command)
43
int is_builtin(const char *command)
57
{
44
{
58
    builtin_t *cmd;
45
    builtin_t *cmd;
59
    unsigned int i = 0;
46
    unsigned int i = 0;
60
 
47