4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 /* All Rights Reserved */
31 #pragma ident "%Z%%M% %I% %E% SMI"
47 const char badopt
[] = "bad option(s)";
48 const char mailmsg
[] = "you have mail\n";
49 const char nospace
[] = "no space";
50 const char nostack
[] = "no stack space";
51 const char synmsg
[] = "syntax error";
53 const char badnum
[] = "bad number";
54 const char badsig
[] = "bad signal";
55 const char badid
[] = "invalid id";
56 const char badparam
[] = "parameter null or not set";
57 const char unset
[] = "parameter not set";
58 const char badsub
[] = "bad substitution";
59 const char badcreate
[] = "cannot create";
60 const char nofork
[] = "fork failed - too many processes";
61 const char noswap
[] = "cannot fork: no swap space";
62 const char restricted
[] = "restricted";
63 const char piperr
[] = "cannot make pipe";
64 const char badopen
[] = "cannot open";
65 const char coredump
[] = " - core dumped";
66 const char arglist
[] = "arg list too long";
67 const char txtbsy
[] = "text busy";
68 const char toobig
[] = "too big";
69 const char badexec
[] = "cannot execute";
70 const char notfound
[] = "not found";
71 const char badfile
[] = "bad file number";
72 const char badshift
[] = "cannot shift";
73 const char baddir
[] = "bad directory";
74 const char badtrap
[] = "bad trap";
75 const char wtfailed
[] = "is read only";
76 const char notid
[] = "is not an identifier";
77 const char badulimit
[] = "exceeds allowable limit";
78 const char badreturn
[] = "cannot return when not in function";
79 const char badexport
[] = "cannot export functions";
80 const char badunset
[] = "cannot unset";
81 const char nohome
[] = "no home directory";
82 const char badperm
[] = "execute permission denied";
83 const char longpwd
[] = "sh error: pwd too long";
84 const char mssgargn
[] = "missing arguments";
85 const char libacc
[] = "can't access a needed shared library";
86 const char libbad
[] = "accessing a corrupted shared library";
87 const char libscn
[] = ".lib section in a.out corrupted";
88 const char libmax
[] = "attempting to link in too many libs";
89 const char emultihop
[] = "Multihop attempted";
90 const char nulldir
[] = "null directory";
91 const char enotdir
[] = "not a directory";
92 const char enoent
[] = "does not exist";
93 const char eacces
[] = "permission denied";
94 const char enolink
[] = "remote link inactive";
95 const char exited
[] = "Done";
96 const char running
[] = "Running";
97 const char ambiguous
[] = "ambiguous";
98 const char usage
[] = "usage";
99 const char nojc
[] = "no job control";
100 const char stopuse
[] = "stop id ...";
101 const char ulimuse
[] = "ulimit [ -HSacdfnstv ] [ limit ]";
102 const char killuse
[] = "kill [ [ -sig ] id ... | -l ]";
103 const char jobsuse
[] = "jobs [ [ -l | -p ] [ id ... ] | -x cmd ]";
104 const char nosuchjob
[] = "no such job";
105 const char nosuchpid
[] = "no such process";
106 const char nosuchpgid
[] = "no such process group";
107 const char nocurjob
[] = "no current job";
108 const char jobsstopped
[] = "there are stopped jobs";
109 const char jobsrunning
[] = "there are running jobs";
110 const char loginsh
[] = "cannot stop login shell";
111 const char nlorsemi
[] = "newline or ;";
112 const char signalnum
[] = "Signal ";
113 const char badpwd
[] = "cannot determine current directory";
114 const char badlocale
[] = "couldn't set locale correctly\n";
115 const char nobracket
[] = "] missing";
116 const char noparen
[] = ") expected";
117 const char noarg
[] = "argument expected";
120 * messages for 'builtin' functions
122 const char btest
[] = "test";
123 const char badop
[] = "unknown operator ";
127 const char pathname
[] = "PATH";
128 const char cdpname
[] = "CDPATH";
129 const char homename
[] = "HOME";
130 const char mailname
[] = "MAIL";
131 const char ifsname
[] = "IFS";
132 const char ps1name
[] = "PS1";
133 const char ps2name
[] = "PS2";
134 const char mchkname
[] = "MAILCHECK";
135 const char acctname
[] = "SHACCT";
136 const char mailpname
[] = "MAILPATH";
141 const char nullstr
[] = "";
142 const char sptbnl
[] = " \t\n";
143 const char defpath
[] = "/usr/bin:";
144 const char colon
[] = ": ";
145 const char minus
[] = "-";
146 const char endoffile
[] = "end of file";
147 const char unexpected
[] = " unexpected";
148 const char atline
[] = " at line ";
149 const char devnull
[] = "/dev/null";
150 const char execpmsg
[] = "+ ";
151 const char readmsg
[] = "> ";
152 const char stdprompt
[] = "$ ";
153 const char supprompt
[] = "# ";
154 const char profile
[] = ".profile";
155 const char sysprofile
[] = "/etc/profile";
160 const char localedir
[] = "/usr/lib/locale";
161 int localedir_exists
;
167 const struct sysnod reserved
[] =
186 const int no_reserved
= sizeof(reserved
)/sizeof(struct sysnod
);
188 const char export
[] = "export";
189 const char readonly
[] = "readonly";
192 const struct sysnod commands
[] =
201 { "break", SYSBREAK
},
204 { "continue", SYSCONT
},
209 { "export", SYSXPORT
},
211 { "getopts", SYSGETOPT
},
216 { "login", SYSLOGIN
},
217 { "newgrp", SYSLOGIN
},
219 { "newgrp", SYSNEWGRP
},
224 { "readonly", SYSRDONLY
},
225 { "return", SYSRETURN
},
227 { "shift", SYSSHFT
},
229 { "suspend", SYSSUSP
},
231 { "times", SYSTIMES
},
237 { "ulimit", SYSULIMIT
},
238 { "umask", SYSUMASK
},
245 const int no_commands
= sizeof(commands
)/sizeof(struct sysnod
);