10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
51746Svikram  * Common Development and Distribution License (the "License").
61746Svikram  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*
221746Svikram  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate  * Use is subject to license terms.
240Sstevel@tonic-gate  */
250Sstevel@tonic-gate 
260Sstevel@tonic-gate #ifndef	_MESSAGE_H
270Sstevel@tonic-gate #define	_MESSAGE_H
280Sstevel@tonic-gate 
290Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
300Sstevel@tonic-gate 
310Sstevel@tonic-gate #ifdef	__cplusplus
320Sstevel@tonic-gate extern "C" {
330Sstevel@tonic-gate #endif
340Sstevel@tonic-gate 
350Sstevel@tonic-gate #define	FILE_MISS gettext("file not found: %s\n")
360Sstevel@tonic-gate 
370Sstevel@tonic-gate #define	ARCH_EXEC_MISS gettext("archive creation file not found: %s: %s\n")
380Sstevel@tonic-gate 
390Sstevel@tonic-gate #define	DIR_MISS gettext("directory not found: %s\n")
400Sstevel@tonic-gate 
412115Svikram #define	MUST_BE_ROOT gettext("you must be root to run this command\n")
420Sstevel@tonic-gate 
43316Svikram #define	NOT_GRUB_BOOT gettext("%s: not a GRUB boot OS instance\n")
440Sstevel@tonic-gate 
450Sstevel@tonic-gate #define	MULT_CMDS gettext("multiple commands specified: -%c\n")
460Sstevel@tonic-gate 
470Sstevel@tonic-gate #define	INVALID_SUBCMD gettext("invalid sub-command specified: %s\n")
480Sstevel@tonic-gate 
490Sstevel@tonic-gate #define	NEED_SUBCMD gettext("this command requires a sub-command\n")
500Sstevel@tonic-gate 
510Sstevel@tonic-gate #define	NEED_CMD gettext("a command option must be specified\n")
520Sstevel@tonic-gate 
530Sstevel@tonic-gate #define	CMD_ERR gettext("command failed with errors: %s\n")
540Sstevel@tonic-gate 
550Sstevel@tonic-gate #define	DUP_OPT gettext("duplicate options specified: -%c\n")
560Sstevel@tonic-gate 
570Sstevel@tonic-gate #define	BAD_OPT gettext("invalid option or missing option argument: -%c\n")
580Sstevel@tonic-gate 
590Sstevel@tonic-gate #define	NO_ARG gettext("missing or too many command argument(s)\n")
600Sstevel@tonic-gate 
610Sstevel@tonic-gate #define	NO_OPT_REQ gettext("this sub-command (%s) does not take options\n")
620Sstevel@tonic-gate 
630Sstevel@tonic-gate #define	MISS_OPT gettext("an option is required for this sub-command: %s\n")
640Sstevel@tonic-gate 
650Sstevel@tonic-gate #define	ABS_PATH_REQ gettext("path is not absolute: %s\n")
660Sstevel@tonic-gate 
670Sstevel@tonic-gate #define	TOO_LONG gettext("the following line is too long (> %d chars)\n\t%s\n")
680Sstevel@tonic-gate 
690Sstevel@tonic-gate #define	NOT_ON_SPARC gettext("this operation is not supported on sparc\n")
700Sstevel@tonic-gate 
710Sstevel@tonic-gate #define	NEED_ALT_ROOT gettext("an alternate root must be specified\n")
720Sstevel@tonic-gate 
73621Svikram #define	ALT_ROOT_INVALID \
74621Svikram     gettext("an alternate root (%s) cannot be used with this sub-command\n")
75621Svikram 
760Sstevel@tonic-gate #define	NO_FILE_ENTRY gettext("file not in list: %s\n")
770Sstevel@tonic-gate 
780Sstevel@tonic-gate #define	DUP_FILE_ENTRY gettext("file already in list: %s\n")
790Sstevel@tonic-gate 
800Sstevel@tonic-gate #define	NO_ENTRY gettext("no %s entry found\n")
810Sstevel@tonic-gate 
820Sstevel@tonic-gate #define	NO_MATCH_ENTRY gettext("no matching entry found\n")
830Sstevel@tonic-gate 
840Sstevel@tonic-gate #define	NO_BOOTADM_MATCH gettext("no matching bootadm entry found\n")
850Sstevel@tonic-gate 
860Sstevel@tonic-gate #define	NO_MEM gettext("could not allocate memory: size = %u\n")
870Sstevel@tonic-gate 
88621Svikram #define	CANNOT_LOCATE_GRUB_MENU gettext("cannot find GRUB menu\n")
89621Svikram 
90621Svikram #define	GRUB_MENU_DEVICE \
91621Svikram 	gettext("The location for the active GRUB menu is: %s (not mounted)\n")
92621Svikram 
93621Svikram #define	GRUB_MENU_FSTYPE \
94621Svikram     gettext("The filesystem type of the menu device is <%s>\n")
95621Svikram 
96621Svikram #define	GRUB_MENU_PATH gettext("The location for the active GRUB menu is: %s\n")
97621Svikram 
98621Svikram #define	STUBBOOT_DIR_NOT_FOUND gettext("cannot find stubboot directory\n")
99621Svikram 
1000Sstevel@tonic-gate #define	NO_CMD gettext("no command at line %d\n")
1010Sstevel@tonic-gate 
1020Sstevel@tonic-gate #define	DUP_CMD \
1030Sstevel@tonic-gate     gettext("duplicate command %s at line %d of %sboot/grub/menu.lst\n")
1040Sstevel@tonic-gate 
1050Sstevel@tonic-gate #define	INVALID_TIMEOUT gettext("invalid timeout value: %s\n")
1060Sstevel@tonic-gate 
1070Sstevel@tonic-gate #define	NO_MENU gettext("menu file not found: %s\n")
1080Sstevel@tonic-gate 
1090Sstevel@tonic-gate #define	LIST_TITLE gettext("%d %s\n")
1100Sstevel@tonic-gate 
1110Sstevel@tonic-gate #define	GLOBAL_CMD gettext("%s %s\n")
1120Sstevel@tonic-gate 
1130Sstevel@tonic-gate #define	REGCOMP_FAIL gettext("regular expression failed to compile\n")
1140Sstevel@tonic-gate 
1150Sstevel@tonic-gate #define	INVALID_ENTRY gettext("invalid boot entry number: %s\n")
1160Sstevel@tonic-gate 
1170Sstevel@tonic-gate #define	DUP_ENTRY gettext("a boot entry with this title already exists: %s\n")
1180Sstevel@tonic-gate 
1190Sstevel@tonic-gate #define	LIST_ENTRY gettext("%s\n")
1200Sstevel@tonic-gate 
1210Sstevel@tonic-gate #define	SUBOPT_VALUE gettext("suboption %s requires a value\n")
1220Sstevel@tonic-gate 
1230Sstevel@tonic-gate #define	INVALID_SUBOPT gettext("invalid suboption: %s\n")
1240Sstevel@tonic-gate 
1250Sstevel@tonic-gate #define	SUBOPT_MISS gettext("missing suboption: %s\n")
1260Sstevel@tonic-gate 
1270Sstevel@tonic-gate #define	INVALID_HDR gettext("invalid entry header: %s\n")
1280Sstevel@tonic-gate 
1290Sstevel@tonic-gate #define	INVALID_TITLE gettext("invalid title entry: %s\n")
1300Sstevel@tonic-gate 
1310Sstevel@tonic-gate #define	INVALID_ROOT gettext("invalid root entry: %s\n")
1320Sstevel@tonic-gate 
1330Sstevel@tonic-gate #define	INVALID_KERNEL gettext("invalid kernel entry: %s\n")
1340Sstevel@tonic-gate 
1350Sstevel@tonic-gate #define	INVALID_MODULE gettext("invalid module entry: %s\n")
1360Sstevel@tonic-gate 
1370Sstevel@tonic-gate #define	INVALID_FOOTER gettext("invalid entry footer: %s\n")
1380Sstevel@tonic-gate 
1390Sstevel@tonic-gate #define	EMPTY_FILE gettext("file is missing or empty: %s\n")
1400Sstevel@tonic-gate 
1410Sstevel@tonic-gate #define	UNLINK_EMPTY gettext("file is empty, deleting file: %s\n")
1420Sstevel@tonic-gate 
1430Sstevel@tonic-gate #define	UNLINK_FAIL gettext("failed to unlink file: %s: %s\n")
1440Sstevel@tonic-gate 
1450Sstevel@tonic-gate #define	NOT_CHR gettext("not a character device: %s\n")
1460Sstevel@tonic-gate 
1470Sstevel@tonic-gate #define	NO_DIR gettext("directory not found: %s\n")
1480Sstevel@tonic-gate 
1490Sstevel@tonic-gate #define	NOT_DIR gettext("not a directory: %s\n")
1500Sstevel@tonic-gate 
1510Sstevel@tonic-gate #define	NO_MATCH gettext("no matching entry found: %s\n")
1520Sstevel@tonic-gate 
1530Sstevel@tonic-gate #define	INVALID_OPT gettext("invalid option: %s\n")
1540Sstevel@tonic-gate 
1550Sstevel@tonic-gate #define	FAILED_SIG gettext("Cannot set SIGCHLD disposition: %s\n")
1560Sstevel@tonic-gate 
1570Sstevel@tonic-gate #define	CANT_UNBLOCK_SIGCHLD gettext("Cannot unblock SIGCHLD: %s\n")
1580Sstevel@tonic-gate 
1590Sstevel@tonic-gate #define	BLOCKED_SIG gettext("SIGCHLD signal blocked. Cannot exec: %s\n")
1600Sstevel@tonic-gate 
1610Sstevel@tonic-gate #define	POPEN_FAIL gettext("popen failed: %s\n")
1620Sstevel@tonic-gate 
1630Sstevel@tonic-gate #define	PCLOSE_FAIL gettext("pclose failed: %s\n")
1640Sstevel@tonic-gate 
1650Sstevel@tonic-gate #define	EXEC_FAIL gettext("command terminated abnormally: %s: %d\n")
1660Sstevel@tonic-gate 
1670Sstevel@tonic-gate #define	INVALID_ARCH_FS \
1680Sstevel@tonic-gate 	gettext("invalid or unsupported archive filesystem: %s\n")
1690Sstevel@tonic-gate 
1700Sstevel@tonic-gate #define	NEED_FORCE \
1710Sstevel@tonic-gate 	gettext("This operation is only supported with the force flag (-f)\n")
1720Sstevel@tonic-gate 
1730Sstevel@tonic-gate #define	REL_PATH_REQ \
1740Sstevel@tonic-gate 	gettext("path (%s) must be relative to root. For example: etc/foo\n")
1750Sstevel@tonic-gate 
1760Sstevel@tonic-gate #define	OPEN_FAIL gettext("failed to open file: %s: %s\n")
1770Sstevel@tonic-gate 
1780Sstevel@tonic-gate #define	LOCK_FAIL gettext("failed to lock file: %s: %s\n")
1790Sstevel@tonic-gate 
1800Sstevel@tonic-gate #define	UNLOCK_FAIL gettext("failed to unlock file: %s: %s\n")
1810Sstevel@tonic-gate 
1820Sstevel@tonic-gate #define	FILE_LOCKED gettext("Another instance of bootadm (pid %u) is running\n")
1830Sstevel@tonic-gate 
1840Sstevel@tonic-gate #define	FLIST_FAIL \
1850Sstevel@tonic-gate 	gettext("failed to open archive filelist: %s: %s\n")
1860Sstevel@tonic-gate 
1870Sstevel@tonic-gate #define	NO_FLIST gettext("archive filelist is empty\n")
1880Sstevel@tonic-gate 
1890Sstevel@tonic-gate #define	CLOSE_FAIL gettext("failed to close file: %s: %s\n")
1900Sstevel@tonic-gate 
1910Sstevel@tonic-gate #define	RENAME_FAIL gettext("rename to file failed: %s: %s\n")
1920Sstevel@tonic-gate 
1930Sstevel@tonic-gate #define	NOT_IN_MNTTAB gettext("alternate root %s not in mnttab\n")
1940Sstevel@tonic-gate 
1950Sstevel@tonic-gate #define	CANT_RESOLVE gettext("cannot resolve path %s: %s\n")
1960Sstevel@tonic-gate 
1970Sstevel@tonic-gate #define	ROOT_ABS gettext("this sub-command doesn't take root arguments: %s\n")
1980Sstevel@tonic-gate 
1990Sstevel@tonic-gate #define	RDONLY_FS gettext("read-only filesystem: %s\n")
2000Sstevel@tonic-gate 
2010Sstevel@tonic-gate #define	ARCHIVE_FAIL gettext("failed to create boot archive: %s\n")
2020Sstevel@tonic-gate 
2030Sstevel@tonic-gate #define	ARCHIVE_NOT_CREATED gettext("couldn't create boot archive: %s\n")
2040Sstevel@tonic-gate 
2050Sstevel@tonic-gate #define	WRITE_FAIL gettext("write to file failed: %s: %s\n")
2060Sstevel@tonic-gate 
2070Sstevel@tonic-gate #define	STAT_FAIL gettext("stat of file failed: %s: %s\n")
2080Sstevel@tonic-gate 
2090Sstevel@tonic-gate #define	PACK_FAIL gettext("failed to pack stat data: %s\n")
2100Sstevel@tonic-gate 
2110Sstevel@tonic-gate #define	NVALLOC_FAIL gettext("failed to create stat data: %s\n")
2120Sstevel@tonic-gate 
2130Sstevel@tonic-gate #define	NVADD_FAIL gettext("failed to update stat data for: %s: %s\n")
2140Sstevel@tonic-gate 
2150Sstevel@tonic-gate #define	NOT_NV gettext("option is not a name=value pair: %s\n")
2160Sstevel@tonic-gate 
2170Sstevel@tonic-gate #define	DISKMAP_FAIL gettext("cannot map disk %s to grub name\n")
2180Sstevel@tonic-gate 
2190Sstevel@tonic-gate #define	DISKMAP_FAIL_NONFATAL \
2200Sstevel@tonic-gate     gettext("cannot map disk %s to grub name, assume disk 0.\n")
2210Sstevel@tonic-gate 
2220Sstevel@tonic-gate #define	WARN_BOOT \
2230Sstevel@tonic-gate gettext("WARNING: Incorrect use of this command may make \
2240Sstevel@tonic-gate the system unbootable\n")
2250Sstevel@tonic-gate 
2260Sstevel@tonic-gate #define	WARN_FAILSAFE_BOOT \
2270Sstevel@tonic-gate gettext("WARNING: Incorrect use of this command may make \
2280Sstevel@tonic-gate the failsafe archive unbootable\n")
2290Sstevel@tonic-gate 
2300Sstevel@tonic-gate #define	UPDATE_NO_STAT \
2310Sstevel@tonic-gate 	gettext("%s state file %s not found.\n")
2320Sstevel@tonic-gate 
2330Sstevel@tonic-gate #define	CHECK_NOT_SUPPORTED \
2340Sstevel@tonic-gate 	gettext("the check option is not supported with subcmd: %s\n")
2350Sstevel@tonic-gate 
2360Sstevel@tonic-gate #define	PARSEABLE_NEW_FILE	gettext("    new     %s\n")
2370Sstevel@tonic-gate 
2380Sstevel@tonic-gate #define	PARSEABLE_OUT_DATE	gettext("    changed %s\n")
2390Sstevel@tonic-gate 
240*2583Svikram #define	PARSEABLE_STALE_FILE	gettext("    stale %s\n")
241*2583Svikram 
2420Sstevel@tonic-gate #define	UPDATE_FORCE gettext("forced update of archive requested\n")
2430Sstevel@tonic-gate 
2440Sstevel@tonic-gate #define	NO_NEW_STAT gettext("cannot create new stat data\n")
2450Sstevel@tonic-gate 
2460Sstevel@tonic-gate #define	UPDATE_ARCH_MISS gettext("archive not found: %s\n")
2470Sstevel@tonic-gate 
2480Sstevel@tonic-gate #define	READ_FAIL gettext("read failed for file: %s: %s\n")
2490Sstevel@tonic-gate 
2500Sstevel@tonic-gate #define	UNPACK_FAIL gettext("failed to unpack stat data: %s: %s\n")
2510Sstevel@tonic-gate 
2520Sstevel@tonic-gate #define	NFTW_FAIL gettext("cannot find: %s: %s\n")
2530Sstevel@tonic-gate 
2540Sstevel@tonic-gate #define	NVL_ALLOC_FAIL gettext("failed to alloc nvlist: %s\n")
2550Sstevel@tonic-gate 
2560Sstevel@tonic-gate #define	STATVFS_FAIL gettext("statvfs failed for %s: %s\n")
2570Sstevel@tonic-gate 
2580Sstevel@tonic-gate #define	IS_RAMDISK gettext("%s is on a ramdisk device\n")
2590Sstevel@tonic-gate 
2600Sstevel@tonic-gate #define	SKIP_RAMDISK gettext("Skipping archive creation\n")
2610Sstevel@tonic-gate 
2620Sstevel@tonic-gate #define	PRINT gettext("%s\n")
2630Sstevel@tonic-gate 
2640Sstevel@tonic-gate #define	PRINT_NO_NEWLINE gettext("%s")
2650Sstevel@tonic-gate 
2660Sstevel@tonic-gate #define	PRINT_TITLE gettext("%d %s\n")
2670Sstevel@tonic-gate 
2680Sstevel@tonic-gate #define	INT_ERROR gettext("Internal error: %s\n")
2690Sstevel@tonic-gate 
2700Sstevel@tonic-gate #define	CANT_FIND_USER \
2710Sstevel@tonic-gate 	gettext("getpwnam: uid for %s failed, defaulting to %d\n")
2720Sstevel@tonic-gate 
2730Sstevel@tonic-gate #define	CANT_FIND_GROUP \
2740Sstevel@tonic-gate 	gettext("getgrnam: gid for %s failed, defaulting to %d\n")
2750Sstevel@tonic-gate 
2760Sstevel@tonic-gate #define	CHMOD_FAIL gettext("chmod operation on %s failed - %s\n")
2770Sstevel@tonic-gate 
2780Sstevel@tonic-gate #define	CHOWN_FAIL gettext("chgrp operation on %s failed - %s\n")
2790Sstevel@tonic-gate 
280316Svikram #define	MISSING_SLICE_FILE gettext("GRUB slice file %s missing: %s\n")
281316Svikram 
282316Svikram #define	BAD_SLICE_FILE gettext("Invalid GRUB slice file %s\n")
283316Svikram 
284316Svikram #define	MKDIR_FAILED gettext("mkdir of %s failed: %s\n")
285316Svikram 
286621Svikram #define	MOUNT_FAILED gettext("mount of %s (fstype %s) failed\n")
287621Svikram 
288621Svikram #define	MOUNT_MNTPT_FAILED gettext("mount at %s failed\n")
289316Svikram 
290316Svikram #define	RMDIR_FAILED gettext("rmdir of %s failed: %s\n")
291316Svikram 
292348Svikram #define	UMOUNT_FAILED gettext("unmount of %s failed\n")
293316Svikram 
294316Svikram #define	CANNOT_RESTORE_GRUB_SLICE gettext("cannot restore GRUB slice\n")
295316Svikram 
296316Svikram #define	RESTORE_GRUB_FAILED gettext("cannot restore GRUB loader\n")
297316Svikram 
298316Svikram #define	MISSING_BACKUP_MENU gettext("no backup menu %s: %s\n")
299316Svikram 
300316Svikram #define	RESTORE_MENU_FAILED gettext("cannot restore menu %s\n")
301316Svikram 
302316Svikram #define	MISSING_ROOT_FILE gettext("file missing: %s: %s\n")
303316Svikram 
304316Svikram #define	BAD_ROOT_FILE gettext("file is invalid: %s\n")
305316Svikram 
3062115Svikram #define	TRAILING_ARGS gettext("invalid trailing arguments\n")
3072115Svikram 
308316Svikram #define	RESTORING_GRUB \
309316Svikram 	gettext("No GRUB installation found. Restoring GRUB from backup\n")
310316Svikram 
311316Svikram #define	REBOOT_WITH_ARGS_FAILED \
312316Svikram 	gettext("Cannot update menu. Cannot reboot with requested arguments\n")
313316Svikram 
3141746Svikram #define	UPDATING_FDISK gettext("Updating fdisk table.\n")
3151746Svikram 
3161746Svikram #define	FDISK_UPDATE_FAILED gettext("Update of fdisk table failed.\n")
3171746Svikram 
3181746Svikram #define	MISSING_FDISK_FILE \
3191746Svikram 	gettext("Missing file (%s). Cannot update fdisk table.\n")
3201746Svikram 
3211746Svikram #define	FILE_REMOVE_FAILED \
3221746Svikram 	gettext("Failed to delete one or more of (%s,%s). Remove manually.\n")
3231746Svikram 
3240Sstevel@tonic-gate #ifdef	__cplusplus
3250Sstevel@tonic-gate }
3260Sstevel@tonic-gate #endif
3270Sstevel@tonic-gate 
3280Sstevel@tonic-gate #endif /* _MESSAGE_H */
329