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 /* 223446Smrj * Copyright 2007 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 353446Smrj #include <libintl.h> 363446Smrj 370Sstevel@tonic-gate #define FILE_MISS gettext("file not found: %s\n") 380Sstevel@tonic-gate 390Sstevel@tonic-gate #define ARCH_EXEC_MISS gettext("archive creation file not found: %s: %s\n") 400Sstevel@tonic-gate 410Sstevel@tonic-gate #define DIR_MISS gettext("directory not found: %s\n") 420Sstevel@tonic-gate 432115Svikram #define MUST_BE_ROOT gettext("you must be root to run this command\n") 440Sstevel@tonic-gate 45316Svikram #define NOT_GRUB_BOOT gettext("%s: not a GRUB boot OS instance\n") 460Sstevel@tonic-gate 470Sstevel@tonic-gate #define MULT_CMDS gettext("multiple commands specified: -%c\n") 480Sstevel@tonic-gate 490Sstevel@tonic-gate #define INVALID_SUBCMD gettext("invalid sub-command specified: %s\n") 500Sstevel@tonic-gate 510Sstevel@tonic-gate #define NEED_SUBCMD gettext("this command requires a sub-command\n") 520Sstevel@tonic-gate 530Sstevel@tonic-gate #define NEED_CMD gettext("a command option must be specified\n") 540Sstevel@tonic-gate 550Sstevel@tonic-gate #define CMD_ERR gettext("command failed with errors: %s\n") 560Sstevel@tonic-gate 570Sstevel@tonic-gate #define DUP_OPT gettext("duplicate options specified: -%c\n") 580Sstevel@tonic-gate 590Sstevel@tonic-gate #define BAD_OPT gettext("invalid option or missing option argument: -%c\n") 600Sstevel@tonic-gate 610Sstevel@tonic-gate #define NO_ARG gettext("missing or too many command argument(s)\n") 620Sstevel@tonic-gate 630Sstevel@tonic-gate #define NO_OPT_REQ gettext("this sub-command (%s) does not take options\n") 640Sstevel@tonic-gate 650Sstevel@tonic-gate #define MISS_OPT gettext("an option is required for this sub-command: %s\n") 660Sstevel@tonic-gate 670Sstevel@tonic-gate #define ABS_PATH_REQ gettext("path is not absolute: %s\n") 680Sstevel@tonic-gate 690Sstevel@tonic-gate #define TOO_LONG gettext("the following line is too long (> %d chars)\n\t%s\n") 700Sstevel@tonic-gate 710Sstevel@tonic-gate #define NOT_ON_SPARC gettext("this operation is not supported on sparc\n") 720Sstevel@tonic-gate 730Sstevel@tonic-gate #define NEED_ALT_ROOT gettext("an alternate root must be specified\n") 740Sstevel@tonic-gate 75621Svikram #define ALT_ROOT_INVALID \ 76621Svikram gettext("an alternate root (%s) cannot be used with this sub-command\n") 77621Svikram 780Sstevel@tonic-gate #define NO_FILE_ENTRY gettext("file not in list: %s\n") 790Sstevel@tonic-gate 800Sstevel@tonic-gate #define DUP_FILE_ENTRY gettext("file already in list: %s\n") 810Sstevel@tonic-gate 820Sstevel@tonic-gate #define NO_ENTRY gettext("no %s entry found\n") 830Sstevel@tonic-gate 840Sstevel@tonic-gate #define NO_MATCH_ENTRY gettext("no matching entry found\n") 850Sstevel@tonic-gate 860Sstevel@tonic-gate #define NO_BOOTADM_MATCH gettext("no matching bootadm entry found\n") 870Sstevel@tonic-gate 880Sstevel@tonic-gate #define NO_MEM gettext("could not allocate memory: size = %u\n") 890Sstevel@tonic-gate 90621Svikram #define CANNOT_LOCATE_GRUB_MENU gettext("cannot find GRUB menu\n") 91621Svikram 92621Svikram #define GRUB_MENU_DEVICE \ 93621Svikram gettext("The location for the active GRUB menu is: %s (not mounted)\n") 94621Svikram 95621Svikram #define GRUB_MENU_FSTYPE \ 96621Svikram gettext("The filesystem type of the menu device is <%s>\n") 97621Svikram 98621Svikram #define GRUB_MENU_PATH gettext("The location for the active GRUB menu is: %s\n") 99621Svikram 100621Svikram #define STUBBOOT_DIR_NOT_FOUND gettext("cannot find stubboot directory\n") 101621Svikram 1020Sstevel@tonic-gate #define NO_CMD gettext("no command at line %d\n") 1030Sstevel@tonic-gate 1040Sstevel@tonic-gate #define DUP_CMD \ 1050Sstevel@tonic-gate gettext("duplicate command %s at line %d of %sboot/grub/menu.lst\n") 1060Sstevel@tonic-gate 1070Sstevel@tonic-gate #define INVALID_TIMEOUT gettext("invalid timeout value: %s\n") 1080Sstevel@tonic-gate 1090Sstevel@tonic-gate #define NO_MENU gettext("menu file not found: %s\n") 1100Sstevel@tonic-gate 1110Sstevel@tonic-gate #define LIST_TITLE gettext("%d %s\n") 1120Sstevel@tonic-gate 1130Sstevel@tonic-gate #define GLOBAL_CMD gettext("%s %s\n") 1140Sstevel@tonic-gate 1150Sstevel@tonic-gate #define REGCOMP_FAIL gettext("regular expression failed to compile\n") 1160Sstevel@tonic-gate 1170Sstevel@tonic-gate #define INVALID_ENTRY gettext("invalid boot entry number: %s\n") 1180Sstevel@tonic-gate 1190Sstevel@tonic-gate #define DUP_ENTRY gettext("a boot entry with this title already exists: %s\n") 1200Sstevel@tonic-gate 1210Sstevel@tonic-gate #define LIST_ENTRY gettext("%s\n") 1220Sstevel@tonic-gate 1230Sstevel@tonic-gate #define SUBOPT_VALUE gettext("suboption %s requires a value\n") 1240Sstevel@tonic-gate 1250Sstevel@tonic-gate #define INVALID_SUBOPT gettext("invalid suboption: %s\n") 1260Sstevel@tonic-gate 1270Sstevel@tonic-gate #define SUBOPT_MISS gettext("missing suboption: %s\n") 1280Sstevel@tonic-gate 1290Sstevel@tonic-gate #define INVALID_HDR gettext("invalid entry header: %s\n") 1300Sstevel@tonic-gate 1310Sstevel@tonic-gate #define INVALID_TITLE gettext("invalid title entry: %s\n") 1320Sstevel@tonic-gate 1330Sstevel@tonic-gate #define INVALID_ROOT gettext("invalid root entry: %s\n") 1340Sstevel@tonic-gate 1353446Smrj #define NO_KERNEL gettext("No kernel line found in entry %d\n") 1363446Smrj 1370Sstevel@tonic-gate #define INVALID_KERNEL gettext("invalid kernel entry: %s\n") 1380Sstevel@tonic-gate 1390Sstevel@tonic-gate #define INVALID_MODULE gettext("invalid module entry: %s\n") 1400Sstevel@tonic-gate 1410Sstevel@tonic-gate #define INVALID_FOOTER gettext("invalid entry footer: %s\n") 1420Sstevel@tonic-gate 1430Sstevel@tonic-gate #define EMPTY_FILE gettext("file is missing or empty: %s\n") 1440Sstevel@tonic-gate 1450Sstevel@tonic-gate #define UNLINK_EMPTY gettext("file is empty, deleting file: %s\n") 1460Sstevel@tonic-gate 1470Sstevel@tonic-gate #define UNLINK_FAIL gettext("failed to unlink file: %s: %s\n") 1480Sstevel@tonic-gate 1490Sstevel@tonic-gate #define NOT_CHR gettext("not a character device: %s\n") 1500Sstevel@tonic-gate 1510Sstevel@tonic-gate #define NO_DIR gettext("directory not found: %s\n") 1520Sstevel@tonic-gate 1530Sstevel@tonic-gate #define NOT_DIR gettext("not a directory: %s\n") 1540Sstevel@tonic-gate 1550Sstevel@tonic-gate #define NO_MATCH gettext("no matching entry found: %s\n") 1560Sstevel@tonic-gate 1570Sstevel@tonic-gate #define INVALID_OPT gettext("invalid option: %s\n") 1580Sstevel@tonic-gate 1590Sstevel@tonic-gate #define FAILED_SIG gettext("Cannot set SIGCHLD disposition: %s\n") 1600Sstevel@tonic-gate 1610Sstevel@tonic-gate #define CANT_UNBLOCK_SIGCHLD gettext("Cannot unblock SIGCHLD: %s\n") 1620Sstevel@tonic-gate 1630Sstevel@tonic-gate #define BLOCKED_SIG gettext("SIGCHLD signal blocked. Cannot exec: %s\n") 1640Sstevel@tonic-gate 1650Sstevel@tonic-gate #define POPEN_FAIL gettext("popen failed: %s\n") 1660Sstevel@tonic-gate 1670Sstevel@tonic-gate #define PCLOSE_FAIL gettext("pclose failed: %s\n") 1680Sstevel@tonic-gate 1690Sstevel@tonic-gate #define EXEC_FAIL gettext("command terminated abnormally: %s: %d\n") 1700Sstevel@tonic-gate 1710Sstevel@tonic-gate #define INVALID_ARCH_FS \ 1720Sstevel@tonic-gate gettext("invalid or unsupported archive filesystem: %s\n") 1730Sstevel@tonic-gate 1740Sstevel@tonic-gate #define NEED_FORCE \ 1750Sstevel@tonic-gate gettext("This operation is only supported with the force flag (-f)\n") 1760Sstevel@tonic-gate 1770Sstevel@tonic-gate #define REL_PATH_REQ \ 1780Sstevel@tonic-gate gettext("path (%s) must be relative to root. For example: etc/foo\n") 1790Sstevel@tonic-gate 1800Sstevel@tonic-gate #define OPEN_FAIL gettext("failed to open file: %s: %s\n") 1810Sstevel@tonic-gate 1820Sstevel@tonic-gate #define LOCK_FAIL gettext("failed to lock file: %s: %s\n") 1830Sstevel@tonic-gate 1840Sstevel@tonic-gate #define UNLOCK_FAIL gettext("failed to unlock file: %s: %s\n") 1850Sstevel@tonic-gate 1863446Smrj #define MMAP_FAIL gettext("failed to mmap file: %s: %s\n") 1873446Smrj 1880Sstevel@tonic-gate #define FILE_LOCKED gettext("Another instance of bootadm (pid %u) is running\n") 1890Sstevel@tonic-gate 1900Sstevel@tonic-gate #define FLIST_FAIL \ 1910Sstevel@tonic-gate gettext("failed to open archive filelist: %s: %s\n") 1920Sstevel@tonic-gate 1930Sstevel@tonic-gate #define NO_FLIST gettext("archive filelist is empty\n") 1940Sstevel@tonic-gate 1950Sstevel@tonic-gate #define CLOSE_FAIL gettext("failed to close file: %s: %s\n") 1960Sstevel@tonic-gate 1970Sstevel@tonic-gate #define RENAME_FAIL gettext("rename to file failed: %s: %s\n") 1980Sstevel@tonic-gate 1990Sstevel@tonic-gate #define NOT_IN_MNTTAB gettext("alternate root %s not in mnttab\n") 2000Sstevel@tonic-gate 2010Sstevel@tonic-gate #define CANT_RESOLVE gettext("cannot resolve path %s: %s\n") 2020Sstevel@tonic-gate 2030Sstevel@tonic-gate #define ROOT_ABS gettext("this sub-command doesn't take root arguments: %s\n") 2040Sstevel@tonic-gate 2050Sstevel@tonic-gate #define RDONLY_FS gettext("read-only filesystem: %s\n") 2060Sstevel@tonic-gate 2073446Smrj #define ARCHIVE_FAIL gettext("Command '%s' failed to create boot archive\n") 2080Sstevel@tonic-gate 2090Sstevel@tonic-gate #define ARCHIVE_NOT_CREATED gettext("couldn't create boot archive: %s\n") 2100Sstevel@tonic-gate 2110Sstevel@tonic-gate #define WRITE_FAIL gettext("write to file failed: %s: %s\n") 2120Sstevel@tonic-gate 2130Sstevel@tonic-gate #define STAT_FAIL gettext("stat of file failed: %s: %s\n") 2140Sstevel@tonic-gate 2150Sstevel@tonic-gate #define PACK_FAIL gettext("failed to pack stat data: %s\n") 2160Sstevel@tonic-gate 2170Sstevel@tonic-gate #define NVALLOC_FAIL gettext("failed to create stat data: %s\n") 2180Sstevel@tonic-gate 2190Sstevel@tonic-gate #define NVADD_FAIL gettext("failed to update stat data for: %s: %s\n") 2200Sstevel@tonic-gate 2210Sstevel@tonic-gate #define NOT_NV gettext("option is not a name=value pair: %s\n") 2220Sstevel@tonic-gate 2230Sstevel@tonic-gate #define DISKMAP_FAIL gettext("cannot map disk %s to grub name\n") 2240Sstevel@tonic-gate 2250Sstevel@tonic-gate #define DISKMAP_FAIL_NONFATAL \ 2260Sstevel@tonic-gate gettext("cannot map disk %s to grub name, assume disk 0.\n") 2270Sstevel@tonic-gate 2280Sstevel@tonic-gate #define WARN_BOOT \ 2290Sstevel@tonic-gate gettext("WARNING: Incorrect use of this command may make \ 2300Sstevel@tonic-gate the system unbootable\n") 2310Sstevel@tonic-gate 2320Sstevel@tonic-gate #define WARN_FAILSAFE_BOOT \ 2330Sstevel@tonic-gate gettext("WARNING: Incorrect use of this command may make \ 2340Sstevel@tonic-gate the failsafe archive unbootable\n") 2350Sstevel@tonic-gate 2360Sstevel@tonic-gate #define UPDATE_NO_STAT \ 2370Sstevel@tonic-gate gettext("%s state file %s not found.\n") 2380Sstevel@tonic-gate 2390Sstevel@tonic-gate #define CHECK_NOT_SUPPORTED \ 2400Sstevel@tonic-gate gettext("the check option is not supported with subcmd: %s\n") 2410Sstevel@tonic-gate 2420Sstevel@tonic-gate #define PARSEABLE_NEW_FILE gettext(" new %s\n") 2430Sstevel@tonic-gate 2440Sstevel@tonic-gate #define PARSEABLE_OUT_DATE gettext(" changed %s\n") 2450Sstevel@tonic-gate 2462583Svikram #define PARSEABLE_STALE_FILE gettext(" stale %s\n") 2472583Svikram 2480Sstevel@tonic-gate #define UPDATE_FORCE gettext("forced update of archive requested\n") 2490Sstevel@tonic-gate 2500Sstevel@tonic-gate #define NO_NEW_STAT gettext("cannot create new stat data\n") 2510Sstevel@tonic-gate 2520Sstevel@tonic-gate #define UPDATE_ARCH_MISS gettext("archive not found: %s\n") 2530Sstevel@tonic-gate 2540Sstevel@tonic-gate #define READ_FAIL gettext("read failed for file: %s: %s\n") 2550Sstevel@tonic-gate 2560Sstevel@tonic-gate #define UNPACK_FAIL gettext("failed to unpack stat data: %s: %s\n") 2570Sstevel@tonic-gate 2580Sstevel@tonic-gate #define NFTW_FAIL gettext("cannot find: %s: %s\n") 2590Sstevel@tonic-gate 2600Sstevel@tonic-gate #define NVL_ALLOC_FAIL gettext("failed to alloc nvlist: %s\n") 2610Sstevel@tonic-gate 2620Sstevel@tonic-gate #define STATVFS_FAIL gettext("statvfs failed for %s: %s\n") 2630Sstevel@tonic-gate 2640Sstevel@tonic-gate #define IS_RAMDISK gettext("%s is on a ramdisk device\n") 2650Sstevel@tonic-gate 2660Sstevel@tonic-gate #define SKIP_RAMDISK gettext("Skipping archive creation\n") 2670Sstevel@tonic-gate 2680Sstevel@tonic-gate #define PRINT gettext("%s\n") 2690Sstevel@tonic-gate 2700Sstevel@tonic-gate #define PRINT_NO_NEWLINE gettext("%s") 2710Sstevel@tonic-gate 2720Sstevel@tonic-gate #define PRINT_TITLE gettext("%d %s\n") 2730Sstevel@tonic-gate 2740Sstevel@tonic-gate #define INT_ERROR gettext("Internal error: %s\n") 2750Sstevel@tonic-gate 2760Sstevel@tonic-gate #define CANT_FIND_USER \ 2770Sstevel@tonic-gate gettext("getpwnam: uid for %s failed, defaulting to %d\n") 2780Sstevel@tonic-gate 2790Sstevel@tonic-gate #define CANT_FIND_GROUP \ 2800Sstevel@tonic-gate gettext("getgrnam: gid for %s failed, defaulting to %d\n") 2810Sstevel@tonic-gate 2820Sstevel@tonic-gate #define CHMOD_FAIL gettext("chmod operation on %s failed - %s\n") 2830Sstevel@tonic-gate 2840Sstevel@tonic-gate #define CHOWN_FAIL gettext("chgrp operation on %s failed - %s\n") 2850Sstevel@tonic-gate 286316Svikram #define MISSING_SLICE_FILE gettext("GRUB slice file %s missing: %s\n") 287316Svikram 288316Svikram #define BAD_SLICE_FILE gettext("Invalid GRUB slice file %s\n") 289316Svikram 290316Svikram #define MKDIR_FAILED gettext("mkdir of %s failed: %s\n") 291316Svikram 292621Svikram #define MOUNT_FAILED gettext("mount of %s (fstype %s) failed\n") 293621Svikram 294621Svikram #define MOUNT_MNTPT_FAILED gettext("mount at %s failed\n") 295316Svikram 296316Svikram #define RMDIR_FAILED gettext("rmdir of %s failed: %s\n") 297316Svikram 298348Svikram #define UMOUNT_FAILED gettext("unmount of %s failed\n") 299316Svikram 300316Svikram #define CANNOT_RESTORE_GRUB_SLICE gettext("cannot restore GRUB slice\n") 301316Svikram 302316Svikram #define RESTORE_GRUB_FAILED gettext("cannot restore GRUB loader\n") 303316Svikram 304316Svikram #define MISSING_BACKUP_MENU gettext("no backup menu %s: %s\n") 305316Svikram 306316Svikram #define RESTORE_MENU_FAILED gettext("cannot restore menu %s\n") 307316Svikram 308316Svikram #define MISSING_ROOT_FILE gettext("file missing: %s: %s\n") 309316Svikram 310316Svikram #define BAD_ROOT_FILE gettext("file is invalid: %s\n") 311316Svikram 3122115Svikram #define TRAILING_ARGS gettext("invalid trailing arguments\n") 3132115Svikram 314316Svikram #define RESTORING_GRUB \ 315316Svikram gettext("No GRUB installation found. Restoring GRUB from backup\n") 316316Svikram 317316Svikram #define REBOOT_WITH_ARGS_FAILED \ 318316Svikram gettext("Cannot update menu. Cannot reboot with requested arguments\n") 319316Svikram 3201746Svikram #define UPDATING_FDISK gettext("Updating fdisk table.\n") 3211746Svikram 3221746Svikram #define FDISK_UPDATE_FAILED gettext("Update of fdisk table failed.\n") 3231746Svikram 3241746Svikram #define MISSING_FDISK_FILE \ 3251746Svikram gettext("Missing file (%s). Cannot update fdisk table.\n") 3261746Svikram 3271746Svikram #define FILE_REMOVE_FAILED \ 3281746Svikram gettext("Failed to delete one or more of (%s,%s). Remove manually.\n") 3291746Svikram 3303446Smrj #define UNKNOWN_KERNEL gettext("Unable to expand %s to a full file path.\n") 3313446Smrj 3323446Smrj #define NOT_DBOOT \ 3333446Smrj gettext("bootadm set-menu %s may only be run on directboot kernels.\n") 3343446Smrj 335*3467Srscott #define DEFAULT_NOT_BAM gettext( \ 336*3467Srscott "Default /boot/grub/menu.lst entry is not controlled by bootadm. Exiting\n") 3373446Smrj 3383446Smrj #define NO_KERNEL_MATCH \ 3393446Smrj gettext("Unexpected kernel command on line %d.\n\ 340*3467Srscott ** YOU MUST MANUALLY CORRECT /boot/grub/menu.lst BEFORE REBOOT! **\n\ 3413446Smrj For details, see %s\n") 3423446Smrj 3433446Smrj #define NO_MODULE_MATCH \ 3443446Smrj gettext("Unexpected module command on line %d.\n\ 345*3467Srscott ** YOU MUST MANUALLY CORRECT /boot/grub/menu.lst BEFORE REBOOT! **\n\ 3463446Smrj For details, see %s\n") 3473446Smrj 3483446Smrj #define NO_KERNELS_FOUND \ 3493446Smrj gettext("Could not find any kernel lines to update. Only entries created by\n\ 3503446Smrj bootadm(1M) and lu(1M) can be updated. All other must be manually changed.\n\ 351*3467Srscott ** YOU MUST MANUALLY CORRECT /boot/grub/menu.lst BEFORE REBOOT! **\n\ 3523446Smrj For details on updating entries, see %s\n") 3533446Smrj 3543446Smrj #define HAND_ADDED_ENTRY \ 3553446Smrj gettext("On upgrades, bootadm(1M) will only upgrade entries added by\n\ 356*3467Srscott bootadm(1M) or lu(1M). The following entry or entries in\n\ 357*3467Srscott /boot/grub/menu.lst will not be upgraded. For details on updating entries,\n\ 358*3467Srscott see %s\n") 3593446Smrj 3603446Smrj #define NOT_ELF_FILE gettext("%s is not an ELF file.\n") 3613446Smrj 3623446Smrj #define WRONG_ELF_CLASS gettext("%s is wrong ELF class 0x%x\n") 3633446Smrj 3643446Smrj #define FAILSAFE_MISSING \ 3653446Smrj gettext("bootadm -m upgrade run, but the failsafe archives have not been\n\ 3663446Smrj updated. Not updating line %d\n") 3673446Smrj 3683449Srscott #define NO_FAILSAFE_KERNEL \ 3693449Srscott gettext("Could not find failsafe kernel -- no failsafe entry will be\n\ 3703449Srscott installed in /boot/grub/menu.lst\n") 3713449Srscott 3720Sstevel@tonic-gate #ifdef __cplusplus 3730Sstevel@tonic-gate } 3740Sstevel@tonic-gate #endif 3750Sstevel@tonic-gate 3760Sstevel@tonic-gate #endif /* _MESSAGE_H */ 377