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