xref: /titanic_41/usr/src/cmd/boot/bootadm/message.h (revision fa9e4066f08beec538e775443c5be79dd423fcab)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_MESSAGE_H
28 #define	_MESSAGE_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 #define	FILE_MISS gettext("file not found: %s\n")
37 
38 #define	ARCH_EXEC_MISS gettext("archive creation file not found: %s: %s\n")
39 
40 #define	DIR_MISS gettext("directory not found: %s\n")
41 
42 #define	MUST_BE_ROOT gettext("you must be root to run this program\n")
43 
44 #define	NOT_GRUB_BOOT gettext("%s: not a GRUB boot OS instance\n")
45 
46 #define	MULT_CMDS gettext("multiple commands specified: -%c\n")
47 
48 #define	INVALID_SUBCMD gettext("invalid sub-command specified: %s\n")
49 
50 #define	NEED_SUBCMD gettext("this command requires a sub-command\n")
51 
52 #define	NEED_CMD gettext("a command option must be specified\n")
53 
54 #define	CMD_ERR gettext("command failed with errors: %s\n")
55 
56 #define	DUP_OPT gettext("duplicate options specified: -%c\n")
57 
58 #define	BAD_OPT gettext("invalid option or missing option argument: -%c\n")
59 
60 #define	NO_ARG gettext("missing or too many command argument(s)\n")
61 
62 #define	NO_OPT_REQ gettext("this sub-command (%s) does not take options\n")
63 
64 #define	MISS_OPT gettext("an option is required for this sub-command: %s\n")
65 
66 #define	ABS_PATH_REQ gettext("path is not absolute: %s\n")
67 
68 #define	TOO_LONG gettext("the following line is too long (> %d chars)\n\t%s\n")
69 
70 #define	NOT_ON_SPARC gettext("this operation is not supported on sparc\n")
71 
72 #define	NEED_ALT_ROOT gettext("an alternate root must be specified\n")
73 
74 #define	ALT_ROOT_INVALID \
75     gettext("an alternate root (%s) cannot be used with this sub-command\n")
76 
77 #define	NO_FILE_ENTRY gettext("file not in list: %s\n")
78 
79 #define	DUP_FILE_ENTRY gettext("file already in list: %s\n")
80 
81 #define	NO_ENTRY gettext("no %s entry found\n")
82 
83 #define	NO_MATCH_ENTRY gettext("no matching entry found\n")
84 
85 #define	NO_BOOTADM_MATCH gettext("no matching bootadm entry found\n")
86 
87 #define	NO_MEM gettext("could not allocate memory: size = %u\n")
88 
89 #define	CANNOT_LOCATE_GRUB_MENU gettext("cannot find GRUB menu\n")
90 
91 #define	GRUB_MENU_DEVICE \
92 	gettext("The location for the active GRUB menu is: %s (not mounted)\n")
93 
94 #define	GRUB_MENU_FSTYPE \
95     gettext("The filesystem type of the menu device is <%s>\n")
96 
97 #define	GRUB_MENU_PATH gettext("The location for the active GRUB menu is: %s\n")
98 
99 #define	STUBBOOT_DIR_NOT_FOUND gettext("cannot find stubboot directory\n")
100 
101 #define	NO_CMD gettext("no command at line %d\n")
102 
103 #define	DUP_CMD \
104     gettext("duplicate command %s at line %d of %sboot/grub/menu.lst\n")
105 
106 #define	INVALID_TIMEOUT gettext("invalid timeout value: %s\n")
107 
108 #define	NO_MENU gettext("menu file not found: %s\n")
109 
110 #define	LIST_TITLE gettext("%d %s\n")
111 
112 #define	GLOBAL_CMD gettext("%s %s\n")
113 
114 #define	REGCOMP_FAIL gettext("regular expression failed to compile\n")
115 
116 #define	INVALID_ENTRY gettext("invalid boot entry number: %s\n")
117 
118 #define	DUP_ENTRY gettext("a boot entry with this title already exists: %s\n")
119 
120 #define	LIST_ENTRY gettext("%s\n")
121 
122 #define	SUBOPT_VALUE gettext("suboption %s requires a value\n")
123 
124 #define	INVALID_SUBOPT gettext("invalid suboption: %s\n")
125 
126 #define	SUBOPT_MISS gettext("missing suboption: %s\n")
127 
128 #define	INVALID_HDR gettext("invalid entry header: %s\n")
129 
130 #define	INVALID_TITLE gettext("invalid title entry: %s\n")
131 
132 #define	INVALID_ROOT gettext("invalid root entry: %s\n")
133 
134 #define	INVALID_KERNEL gettext("invalid kernel entry: %s\n")
135 
136 #define	INVALID_MODULE gettext("invalid module entry: %s\n")
137 
138 #define	INVALID_FOOTER gettext("invalid entry footer: %s\n")
139 
140 #define	EMPTY_FILE gettext("file is missing or empty: %s\n")
141 
142 #define	UNLINK_EMPTY gettext("file is empty, deleting file: %s\n")
143 
144 #define	UNLINK_FAIL gettext("failed to unlink file: %s: %s\n")
145 
146 #define	NOT_CHR gettext("not a character device: %s\n")
147 
148 #define	NO_DIR gettext("directory not found: %s\n")
149 
150 #define	NOT_DIR gettext("not a directory: %s\n")
151 
152 #define	NO_MATCH gettext("no matching entry found: %s\n")
153 
154 #define	INVALID_OPT gettext("invalid option: %s\n")
155 
156 #define	FAILED_SIG gettext("Cannot set SIGCHLD disposition: %s\n")
157 
158 #define	CANT_UNBLOCK_SIGCHLD gettext("Cannot unblock SIGCHLD: %s\n")
159 
160 #define	BLOCKED_SIG gettext("SIGCHLD signal blocked. Cannot exec: %s\n")
161 
162 #define	POPEN_FAIL gettext("popen failed: %s\n")
163 
164 #define	PCLOSE_FAIL gettext("pclose failed: %s\n")
165 
166 #define	EXEC_FAIL gettext("command terminated abnormally: %s: %d\n")
167 
168 #define	INVALID_ARCH_FS \
169 	gettext("invalid or unsupported archive filesystem: %s\n")
170 
171 #define	NEED_FORCE \
172 	gettext("This operation is only supported with the force flag (-f)\n")
173 
174 #define	REL_PATH_REQ \
175 	gettext("path (%s) must be relative to root. For example: etc/foo\n")
176 
177 #define	OPEN_FAIL gettext("failed to open file: %s: %s\n")
178 
179 #define	LOCK_FAIL gettext("failed to lock file: %s: %s\n")
180 
181 #define	UNLOCK_FAIL gettext("failed to unlock file: %s: %s\n")
182 
183 #define	FILE_LOCKED gettext("Another instance of bootadm (pid %u) is running\n")
184 
185 #define	FLIST_FAIL \
186 	gettext("failed to open archive filelist: %s: %s\n")
187 
188 #define	NO_FLIST gettext("archive filelist is empty\n")
189 
190 #define	CLOSE_FAIL gettext("failed to close file: %s: %s\n")
191 
192 #define	RENAME_FAIL gettext("rename to file failed: %s: %s\n")
193 
194 #define	NOT_IN_MNTTAB gettext("alternate root %s not in mnttab\n")
195 
196 #define	CANT_RESOLVE gettext("cannot resolve path %s: %s\n")
197 
198 #define	ROOT_ABS gettext("this sub-command doesn't take root arguments: %s\n")
199 
200 #define	RDONLY_FS gettext("read-only filesystem: %s\n")
201 
202 #define	ARCHIVE_FAIL gettext("failed to create boot archive: %s\n")
203 
204 #define	ARCHIVE_NOT_CREATED gettext("couldn't create boot archive: %s\n")
205 
206 #define	WRITE_FAIL gettext("write to file failed: %s: %s\n")
207 
208 #define	STAT_FAIL gettext("stat of file failed: %s: %s\n")
209 
210 #define	PACK_FAIL gettext("failed to pack stat data: %s\n")
211 
212 #define	NVALLOC_FAIL gettext("failed to create stat data: %s\n")
213 
214 #define	NVADD_FAIL gettext("failed to update stat data for: %s: %s\n")
215 
216 #define	NOT_NV gettext("option is not a name=value pair: %s\n")
217 
218 #define	DISKMAP_FAIL gettext("cannot map disk %s to grub name\n")
219 
220 #define	DISKMAP_FAIL_NONFATAL \
221     gettext("cannot map disk %s to grub name, assume disk 0.\n")
222 
223 #define	WARN_BOOT \
224 gettext("WARNING: Incorrect use of this command may make \
225 the system unbootable\n")
226 
227 #define	WARN_FAILSAFE_BOOT \
228 gettext("WARNING: Incorrect use of this command may make \
229 the failsafe archive unbootable\n")
230 
231 #define	UPDATE_NO_STAT \
232 	gettext("%s state file %s not found.\n")
233 
234 #define	CHECK_NOT_SUPPORTED \
235 	gettext("the check option is not supported with subcmd: %s\n")
236 
237 #define	PARSEABLE_NEW_FILE	gettext("    new     %s\n")
238 
239 #define	PARSEABLE_OUT_DATE	gettext("    changed %s\n")
240 
241 #define	UPDATE_FORCE gettext("forced update of archive requested\n")
242 
243 #define	NO_NEW_STAT gettext("cannot create new stat data\n")
244 
245 #define	UPDATE_ARCH_MISS gettext("archive not found: %s\n")
246 
247 #define	READ_FAIL gettext("read failed for file: %s: %s\n")
248 
249 #define	UNPACK_FAIL gettext("failed to unpack stat data: %s: %s\n")
250 
251 #define	NFTW_FAIL gettext("cannot find: %s: %s\n")
252 
253 #define	NVL_ALLOC_FAIL gettext("failed to alloc nvlist: %s\n")
254 
255 #define	STATVFS_FAIL gettext("statvfs failed for %s: %s\n")
256 
257 #define	IS_RAMDISK gettext("%s is on a ramdisk device\n")
258 
259 #define	SKIP_RAMDISK gettext("Skipping archive creation\n")
260 
261 #define	PRINT gettext("%s\n")
262 
263 #define	PRINT_NO_NEWLINE gettext("%s")
264 
265 #define	PRINT_TITLE gettext("%d %s\n")
266 
267 #define	INT_ERROR gettext("Internal error: %s\n")
268 
269 #define	CANT_FIND_USER \
270 	gettext("getpwnam: uid for %s failed, defaulting to %d\n")
271 
272 #define	CANT_FIND_GROUP \
273 	gettext("getgrnam: gid for %s failed, defaulting to %d\n")
274 
275 #define	CHMOD_FAIL gettext("chmod operation on %s failed - %s\n")
276 
277 #define	CHOWN_FAIL gettext("chgrp operation on %s failed - %s\n")
278 
279 #define	MISSING_SLICE_FILE gettext("GRUB slice file %s missing: %s\n")
280 
281 #define	BAD_SLICE_FILE gettext("Invalid GRUB slice file %s\n")
282 
283 #define	MKDIR_FAILED gettext("mkdir of %s failed: %s\n")
284 
285 #define	MOUNT_FAILED gettext("mount of %s (fstype %s) failed\n")
286 
287 #define	MOUNT_MNTPT_FAILED gettext("mount at %s failed\n")
288 
289 #define	RMDIR_FAILED gettext("rmdir of %s failed: %s\n")
290 
291 #define	UMOUNT_FAILED gettext("unmount of %s failed\n")
292 
293 #define	CANNOT_RESTORE_GRUB_SLICE gettext("cannot restore GRUB slice\n")
294 
295 #define	RESTORE_GRUB_FAILED gettext("cannot restore GRUB loader\n")
296 
297 #define	MISSING_BACKUP_MENU gettext("no backup menu %s: %s\n")
298 
299 #define	RESTORE_MENU_FAILED gettext("cannot restore menu %s\n")
300 
301 #define	MISSING_ROOT_FILE gettext("file missing: %s: %s\n")
302 
303 #define	BAD_ROOT_FILE gettext("file is invalid: %s\n")
304 
305 #define	RESTORING_GRUB \
306 	gettext("No GRUB installation found. Restoring GRUB from backup\n")
307 
308 #define	REBOOT_WITH_ARGS_FAILED \
309 	gettext("Cannot update menu. Cannot reboot with requested arguments\n")
310 
311 #ifdef	__cplusplus
312 }
313 #endif
314 
315 #endif /* _MESSAGE_H */
316