xref: /titanic_44/usr/src/cmd/boot/bootadm/message.h (revision b9238976491622ad75a67ab0c12edf99e36212b9)
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 (the "License").
6  * You may not use this file except in compliance with the License.
7  *
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.
12  *
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]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef	_MESSAGE_H
27 #define	_MESSAGE_H
28 
29 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30 
31 #ifdef	__cplusplus
32 extern "C" {
33 #endif
34 
35 #include <libintl.h>
36 
37 #define	FILE_MISS gettext("file not found: %s\n")
38 
39 #define	ARCH_EXEC_MISS gettext("archive creation file not found: %s: %s\n")
40 
41 #define	DIR_MISS gettext("directory not found: %s\n")
42 
43 #define	MUST_BE_ROOT gettext("you must be root to run this command\n")
44 
45 #define	NOT_GRUB_BOOT gettext("%s: not a GRUB boot OS instance\n")
46 
47 #define	MULT_CMDS gettext("multiple commands specified: -%c\n")
48 
49 #define	INVALID_SUBCMD gettext("invalid sub-command specified: %s\n")
50 
51 #define	NEED_SUBCMD gettext("this command requires a sub-command\n")
52 
53 #define	NEED_CMD gettext("a command option must be specified\n")
54 
55 #define	CMD_ERR gettext("command failed with errors: %s\n")
56 
57 #define	DUP_OPT gettext("duplicate options specified: -%c\n")
58 
59 #define	BAD_OPT gettext("invalid option or missing option argument: -%c\n")
60 
61 #define	NO_ARG gettext("missing or too many command argument(s)\n")
62 
63 #define	NO_OPT_REQ gettext("this sub-command (%s) does not take options\n")
64 
65 #define	MISS_OPT gettext("an option is required for this sub-command: %s\n")
66 
67 #define	ABS_PATH_REQ gettext("path is not absolute: %s\n")
68 
69 #define	TOO_LONG gettext("the following line is too long (> %d chars)\n\t%s\n")
70 
71 #define	NOT_ON_SPARC gettext("this operation is not supported on sparc\n")
72 
73 #define	NEED_ALT_ROOT gettext("an alternate root must be specified\n")
74 
75 #define	ALT_ROOT_INVALID \
76     gettext("an alternate root (%s) cannot be used with this sub-command\n")
77 
78 #define	NO_FILE_ENTRY gettext("file not in list: %s\n")
79 
80 #define	DUP_FILE_ENTRY gettext("file already in list: %s\n")
81 
82 #define	NO_ENTRY gettext("no %s entry found\n")
83 
84 #define	NO_MATCH_ENTRY gettext("no matching entry found\n")
85 
86 #define	NO_BOOTADM_MATCH gettext("no matching bootadm entry found\n")
87 
88 #define	NO_MEM gettext("could not allocate memory: size = %u\n")
89 
90 #define	CANNOT_LOCATE_GRUB_MENU gettext("cannot find GRUB menu\n")
91 
92 #define	GRUB_MENU_DEVICE \
93 	gettext("The location for the active GRUB menu is: %s (not mounted)\n")
94 
95 #define	GRUB_MENU_FSTYPE \
96     gettext("The filesystem type of the menu device is <%s>\n")
97 
98 #define	GRUB_MENU_PATH gettext("The location for the active GRUB menu is: %s\n")
99 
100 #define	STUBBOOT_DIR_NOT_FOUND gettext("cannot find stubboot directory\n")
101 
102 #define	NO_CMD gettext("no command at line %d\n")
103 
104 #define	DUP_CMD \
105     gettext("duplicate command %s at line %d of %sboot/grub/menu.lst\n")
106 
107 #define	INVALID_TIMEOUT gettext("invalid timeout value: %s\n")
108 
109 #define	NO_MENU gettext("menu file not found: %s\n")
110 
111 #define	LIST_TITLE gettext("%d %s\n")
112 
113 #define	GLOBAL_CMD gettext("%s %s\n")
114 
115 #define	REGCOMP_FAIL gettext("regular expression failed to compile\n")
116 
117 #define	INVALID_ENTRY gettext("invalid boot entry number: %s\n")
118 
119 #define	DUP_ENTRY gettext("a boot entry with this title already exists: %s\n")
120 
121 #define	LIST_ENTRY gettext("%s\n")
122 
123 #define	SUBOPT_VALUE gettext("suboption %s requires a value\n")
124 
125 #define	INVALID_SUBOPT gettext("invalid suboption: %s\n")
126 
127 #define	SUBOPT_MISS gettext("missing suboption: %s\n")
128 
129 #define	INVALID_HDR gettext("invalid entry header: %s\n")
130 
131 #define	INVALID_TITLE gettext("invalid title entry: %s\n")
132 
133 #define	INVALID_ROOT gettext("invalid root entry: %s\n")
134 
135 #define	NO_KERNEL gettext("No kernel line found in entry %d\n")
136 
137 #define	INVALID_KERNEL gettext("invalid kernel entry: %s\n")
138 
139 #define	INVALID_MODULE gettext("invalid module entry: %s\n")
140 
141 #define	INVALID_FOOTER gettext("invalid entry footer: %s\n")
142 
143 #define	EMPTY_FILE gettext("file is missing or empty: %s\n")
144 
145 #define	UNLINK_EMPTY gettext("file is empty, deleting file: %s\n")
146 
147 #define	UNLINK_FAIL gettext("failed to unlink file: %s: %s\n")
148 
149 #define	NOT_CHR gettext("not a character device: %s\n")
150 
151 #define	NO_DIR gettext("directory not found: %s\n")
152 
153 #define	NOT_DIR gettext("not a directory: %s\n")
154 
155 #define	NO_MATCH gettext("no matching entry found: %s\n")
156 
157 #define	INVALID_OPT gettext("invalid option: %s\n")
158 
159 #define	FAILED_SIG gettext("Cannot set SIGCHLD disposition: %s\n")
160 
161 #define	CANT_UNBLOCK_SIGCHLD gettext("Cannot unblock SIGCHLD: %s\n")
162 
163 #define	BLOCKED_SIG gettext("SIGCHLD signal blocked. Cannot exec: %s\n")
164 
165 #define	POPEN_FAIL gettext("popen failed: %s\n")
166 
167 #define	PCLOSE_FAIL gettext("pclose failed: %s\n")
168 
169 #define	EXEC_FAIL gettext("command terminated abnormally: %s: %d\n")
170 
171 #define	INVALID_ARCH_FS \
172 	gettext("invalid or unsupported archive filesystem: %s\n")
173 
174 #define	NEED_FORCE \
175 	gettext("This operation is only supported with the force flag (-f)\n")
176 
177 #define	REL_PATH_REQ \
178 	gettext("path (%s) must be relative to root. For example: etc/foo\n")
179 
180 #define	OPEN_FAIL gettext("failed to open file: %s: %s\n")
181 
182 #define	LOCK_FAIL gettext("failed to lock file: %s: %s\n")
183 
184 #define	UNLOCK_FAIL gettext("failed to unlock file: %s: %s\n")
185 
186 #define	MMAP_FAIL gettext("failed to mmap file: %s: %s\n")
187 
188 #define	FILE_LOCKED gettext("Another instance of bootadm (pid %u) is running\n")
189 
190 #define	FLIST_FAIL \
191 	gettext("failed to open archive filelist: %s: %s\n")
192 
193 #define	NO_FLIST gettext("archive filelist is empty\n")
194 
195 #define	CLOSE_FAIL gettext("failed to close file: %s: %s\n")
196 
197 #define	RENAME_FAIL gettext("rename to file failed: %s: %s\n")
198 
199 #define	NOT_IN_MNTTAB gettext("alternate root %s not in mnttab\n")
200 
201 #define	CANT_RESOLVE gettext("cannot resolve path %s: %s\n")
202 
203 #define	ROOT_ABS gettext("this sub-command doesn't take root arguments: %s\n")
204 
205 #define	RDONLY_FS gettext("read-only filesystem: %s\n")
206 
207 #define	ARCHIVE_FAIL gettext("Command '%s' failed to create boot archive\n")
208 
209 #define	ARCHIVE_NOT_CREATED gettext("couldn't create boot archive: %s\n")
210 
211 #define	WRITE_FAIL gettext("write to file failed: %s: %s\n")
212 
213 #define	STAT_FAIL gettext("stat of file failed: %s: %s\n")
214 
215 #define	PACK_FAIL gettext("failed to pack stat data: %s\n")
216 
217 #define	NVALLOC_FAIL gettext("failed to create stat data: %s\n")
218 
219 #define	NVADD_FAIL gettext("failed to update stat data for: %s: %s\n")
220 
221 #define	NOT_NV gettext("option is not a name=value pair: %s\n")
222 
223 #define	DISKMAP_FAIL gettext("cannot map disk %s to grub name\n")
224 
225 #define	DISKMAP_FAIL_NONFATAL \
226     gettext("cannot map disk %s to grub name, assume disk 0.\n")
227 
228 #define	WARN_BOOT \
229 gettext("WARNING: Incorrect use of this command may make \
230 the system unbootable\n")
231 
232 #define	WARN_FAILSAFE_BOOT \
233 gettext("WARNING: Incorrect use of this command may make \
234 the failsafe archive unbootable\n")
235 
236 #define	UPDATE_NO_STAT \
237 	gettext("%s state file %s not found.\n")
238 
239 #define	CHECK_NOT_SUPPORTED \
240 	gettext("the check option is not supported with subcmd: %s\n")
241 
242 #define	PARSEABLE_NEW_FILE	gettext("    new     %s\n")
243 
244 #define	PARSEABLE_OUT_DATE	gettext("    changed %s\n")
245 
246 #define	PARSEABLE_STALE_FILE	gettext("    stale %s\n")
247 
248 #define	UPDATE_FORCE gettext("forced update of archive requested\n")
249 
250 #define	NO_NEW_STAT gettext("cannot create new stat data\n")
251 
252 #define	UPDATE_ARCH_MISS gettext("archive not found: %s\n")
253 
254 #define	READ_FAIL gettext("read failed for file: %s: %s\n")
255 
256 #define	UNPACK_FAIL gettext("failed to unpack stat data: %s: %s\n")
257 
258 #define	NFTW_FAIL gettext("cannot find: %s: %s\n")
259 
260 #define	NVL_ALLOC_FAIL gettext("failed to alloc nvlist: %s\n")
261 
262 #define	STATVFS_FAIL gettext("statvfs failed for %s: %s\n")
263 
264 #define	IS_RAMDISK gettext("%s is on a ramdisk device\n")
265 
266 #define	SKIP_RAMDISK gettext("Skipping archive creation\n")
267 
268 #define	PRINT gettext("%s\n")
269 
270 #define	PRINT_NO_NEWLINE gettext("%s")
271 
272 #define	PRINT_TITLE gettext("%d %s\n")
273 
274 #define	INT_ERROR gettext("Internal error: %s\n")
275 
276 #define	CANT_FIND_USER \
277 	gettext("getpwnam: uid for %s failed, defaulting to %d\n")
278 
279 #define	CANT_FIND_GROUP \
280 	gettext("getgrnam: gid for %s failed, defaulting to %d\n")
281 
282 #define	CHMOD_FAIL gettext("chmod operation on %s failed - %s\n")
283 
284 #define	CHOWN_FAIL gettext("chgrp operation on %s failed - %s\n")
285 
286 #define	MISSING_SLICE_FILE gettext("GRUB slice file %s missing: %s\n")
287 
288 #define	BAD_SLICE_FILE gettext("Invalid GRUB slice file %s\n")
289 
290 #define	MKDIR_FAILED gettext("mkdir of %s failed: %s\n")
291 
292 #define	MOUNT_FAILED gettext("mount of %s (fstype %s) failed\n")
293 
294 #define	MOUNT_MNTPT_FAILED gettext("mount at %s failed\n")
295 
296 #define	RMDIR_FAILED gettext("rmdir of %s failed: %s\n")
297 
298 #define	UMOUNT_FAILED gettext("unmount of %s failed\n")
299 
300 #define	CANNOT_RESTORE_GRUB_SLICE gettext("cannot restore GRUB slice\n")
301 
302 #define	RESTORE_GRUB_FAILED gettext("cannot restore GRUB loader\n")
303 
304 #define	MISSING_BACKUP_MENU gettext("no backup menu %s: %s\n")
305 
306 #define	RESTORE_MENU_FAILED gettext("cannot restore menu %s\n")
307 
308 #define	MISSING_ROOT_FILE gettext("file missing: %s: %s\n")
309 
310 #define	BAD_ROOT_FILE gettext("file is invalid: %s\n")
311 
312 #define	TRAILING_ARGS gettext("invalid trailing arguments\n")
313 
314 #define	RESTORING_GRUB \
315 	gettext("No GRUB installation found. Restoring GRUB from backup\n")
316 
317 #define	REBOOT_WITH_ARGS_FAILED \
318 	gettext("Cannot update menu. Cannot reboot with requested arguments\n")
319 
320 #define	UPDATING_FDISK gettext("Updating fdisk table.\n")
321 
322 #define	FDISK_UPDATE_FAILED gettext("Update of fdisk table failed.\n")
323 
324 #define	MISSING_FDISK_FILE \
325 	gettext("Missing file (%s). Cannot update fdisk table.\n")
326 
327 #define	FILE_REMOVE_FAILED \
328 	gettext("Failed to delete one or more of (%s,%s). Remove manually.\n")
329 
330 #define	UNKNOWN_KERNEL	gettext("Unable to expand %s to a full file path.\n")
331 
332 #define	UNKNOWN_KERNEL_REBOOT	\
333 	gettext("Rebooting with default kernel and options.\n")
334 
335 #define	NOT_DBOOT \
336 	gettext("bootadm set-menu %s may only be run on directboot kernels.\n")
337 
338 #define	DEFAULT_NOT_BAM	gettext(	\
339 "Default /boot/grub/menu.lst entry is not controlled by bootadm.  Exiting\n")
340 
341 #define	NO_KERNEL_MATCH	\
342 gettext("Unexpected kernel command on line %d.\n\
343 ** YOU MUST MANUALLY CORRECT /boot/grub/menu.lst BEFORE REBOOT! **\n\
344 For details, see %s\n")
345 
346 #define	NO_MODULE_MATCH	\
347 gettext("Unexpected module command on line %d.\n\
348 ** YOU MUST MANUALLY CORRECT /boot/grub/menu.lst BEFORE REBOOT! **\n\
349 For details, see %s\n")
350 
351 #define	NO_KERNELS_FOUND	\
352 gettext("Could not find any kernel lines to update.  Only entries created by\n\
353 bootadm(1M) and lu(1M) can be updated.  All other must be manually changed.\n\
354 ** YOU MUST MANUALLY CORRECT /boot/grub/menu.lst BEFORE REBOOT! **\n\
355 For details on updating entries, see %s\n")
356 
357 #define	HAND_ADDED_ENTRY	\
358 gettext("On upgrades, bootadm(1M) will only upgrade entries added by\n\
359 bootadm(1M) or lu(1M).  The following entry or entries in\n\
360 /boot/grub/menu.lst will not be upgraded.  For details on updating entries,\n\
361 see %s\n")
362 
363 #define	NOT_ELF_FILE gettext("%s is not an ELF file.\n")
364 
365 #define	WRONG_ELF_CLASS gettext("%s is wrong ELF class 0x%x\n")
366 
367 #define	FAILSAFE_MISSING \
368 gettext("bootadm -m upgrade run, but the failsafe archives have not been\n\
369 updated.  Not updating line %d\n")
370 
371 #ifdef	__cplusplus
372 }
373 #endif
374 
375 #endif /* _MESSAGE_H */
376