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 #define	USAGE	gettext("Usage: %s [-fm] stage1 stage2 raw-device\n")
36 
37 #define	DRY_RUN	gettext("dry run--nothing will be written to disk\n")
38 
39 #define	BOOTPAR	gettext("Solaris partition not found. Abort operation.\n")
40 
41 #define	BOOTPAR_INACTIVE	gettext("Solaris boot partition inactive.\n")
42 
43 #define	BOOTPAR_NOTFOUND	\
44     gettext("Solaris boot partition not found on %s\n")
45 
46 #define	NOT_RAW_DEVICE	gettext("device %s is not a char special device\n")
47 
48 #define	NOT_ROOT_SLICE	gettext("raw device must be a root slice (not s2)\n")
49 
50 #define	CONVERT_FAIL	gettext("cannot convert %s to a block device.\n")
51 
52 #define	MOUNT_FAIL	gettext("cannot mount %s\n")
53 
54 #define	MOUNT_FAIL_PCFS	gettext("floppy: cannot mount pcfs\n")
55 
56 #define	MBOOT_PROMPT	\
57 	gettext("Updating master boot sector destroys existing boot " \
58 	"managers (if any).\ncontinue (y/n)?")
59 
60 #define	MBOOT_NOT_UPDATED	gettext("master boot sector not updated\n")
61 
62 #define	OPEN_FAIL	gettext("cannot open/stat device %s\n")
63 
64 #define	OPEN_FAIL_FILE	gettext("cannot open %s\n")
65 
66 #define	OPEN_FAIL_PCFS	gettext("cannot open /boot/grub/stage2 on pcfs\n")
67 
68 #define	PART_FAIL	\
69 	gettext("cannot get the partition information of the disk\n")
70 
71 #define	BAD_PART	\
72 	gettext("Partition %d of the disk has an incorrect offset\n")
73 
74 #define	READ_FAIL_STAGE1	gettext("cannot read stage1 file %s\n")
75 
76 #define	READ_FAIL_STAGE2	gettext("cannot read stage2 file %s\n")
77 
78 #define	READ_FAIL_BPB	gettext("cannot read bios parameter block\n")
79 
80 #define	READ_FAIL_MBR	gettext("cannot read MBR on %s\n")
81 
82 #define	WRITE_FAIL_BOOTSEC	gettext("cannot write master boot sector\n")
83 
84 #define	WRITE_FAIL_PBOOT	gettext("cannot write partition boot sector\n")
85 
86 #define	WRITE_FAIL_STAGE2	gettext("failed to write stage2\n")
87 
88 #define	WRITE_FAIL_STAGE2_BLOCKS	\
89     gettext("stage2 read/write error: read %d bytes, wrote %d bytes\n")
90 
91 #define	WRITE_MBOOT	gettext("stage1 written to master boot sector\n")
92 
93 #define	WRITE_PBOOT	\
94     gettext("stage1 written to partition %d sector 0 (abs %d)\n")
95 
96 #define	WRITE_BOOTSEC_FLOPPY	\
97     gettext("stage1 written to floppy boot sector\n")
98 
99 #define	WRITE_STAGE2_PCFS	gettext("stage2 written to pcfs\n")
100 
101 #define	WRITE_STAGE2_DISK	gettext("stage2 written to partition %d," \
102 	" %d sectors starting at %d (abs %d)\n")
103 
104 #define	PCFS_FRAGMENTED	\
105     gettext("cannot install stage2 on pcfs, too many fragments.\n")
106 
107 #define	OUT_OF_MEMORY	gettext("diskread: out of memory\n")
108 
109 #ifdef	__cplusplus
110 }
111 #endif
112 
113 #endif /* _MESSAGE_H */
114