1 /* $NetBSD: menus.md.pl,v 1.8 2008/05/24 21:42:52 hauke Exp $ */
2 /* Based on english version: */
3 /* NetBSD: menus.md.en,v 1.13 2001/11/29 23:20:58 thorpej Exp */
6 * Copyright
1997 Piermont Information Systems Inc
.
9 * Written by Philip A
. Nelson
for Piermont Information Systems Inc
.
11 * Redistribution
and use in source
and binary forms
, with
or without
12 * modification
, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice
, this list of conditions
and the following disclaimer
.
16 * 2. Redistributions
in binary form must reproduce the above copyright
17 * notice
, this list of conditions
and the following disclaimer
in the
18 * documentation
and/or other materials provided with the distribution
.
19 * 3. All advertising materials mentioning features
or use of this software
20 * must display the following acknowledgement
:
21 * This product includes software developed
for the NetBSD Project by
22 * Piermont Information Systems Inc
.
23 * 4. The name of Piermont Information Systems Inc
. may
not be used to endorse
24 * or promote products derived from this software without specific prior
27 * THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC
. ``AS IS
''
28 * AND ANY EXPRESS OR IMPLIED WARRANTIES
, INCLUDING
, BUT NOT LIMITED TO
, THE
29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 * ARE DISCLAIMED
. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC
. BE
31 * LIABLE FOR ANY DIRECT
, INDIRECT
, INCIDENTAL
, SPECIAL
, EXEMPLARY
, OR
32 * CONSEQUENTIAL DAMAGES
(INCLUDING
, BUT NOT LIMITED TO
, PROCUREMENT OF
33 * SUBSTITUTE GOODS OR SERVICES
; LOSS OF USE
, DATA
, OR PROFITS
; OR BUSINESS
34 * INTERRUPTION
) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY
, WHETHER IN
35 * CONTRACT
, STRICT LIABILITY
, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE
)
36 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE
, EVEN IF ADVISED OF
37 * THE POSSIBILITY OF SUCH DAMAGE
.
41 /* Menu definitions for sysinst. mac68k version, machine dependent. */
43 menu fullpart
, title
"Wybierz";
44 option
"Uzyj tylko czesci dysku", exit, action
{usefull
= 0;};
45 option
"Uzyj calego dysku", exit, action
{usefull
= 1;};
47 menu nodiskmap
, title
"Wybierz opcje", y
=16;
48 display action
{ msg_display
(MSG_nodiskmap
, diskdev
); };
49 option
"Przerwij instalacje", exit, action
{
52 option
"Zainicjuj Mape partycji Dysku", exit, action
{
56 msg_display
(MSG_okwritediskmap
);
57 process_menu
(MENU_okabort
, NULL
);
62 map.size
= NEW_MAP_SIZE
;
63 map.in_use_cnt
= new_map
[0].pmMapBlkCnt
;
64 map.blk
= (struct apple_part_map_entry
*)calloc
(map.size
,
65 sizeof
(struct apple_part_map_entry
));
66 for (i
=0;i
<map.size
;i
++)
67 memcpy
(&map.blk
[i
], &new_map
[i
],
68 sizeof
(struct apple_part_map_entry
));
71 menu editparttable
, title
"Wybierz swoje partycje", exit, y
=14;
72 display action
{ msg_display
(MSG_editparttable
);
74 if (map.selected
>= map.usable_cnt
)
76 disp_selected_part
(map.selected
);
78 option
"Wybierz nastepna partycje", action
{
80 if (map.selected
>= map.usable_cnt
)
83 option
"Zmien wybrana partycje", sub menu chooseid
;
84 option
"Ustaw punkt montazu dla partycji", sub menu mount_point
;
85 option
"Podziel wybrana partycje", action
{
86 int i
, j
, k
, size
, free_size
;
90 j
= map.mblk
[map.selected
];
91 msg_display
(MSG_split_part
, map.blk
[j
].pmPartBlkCnt
);
92 msg_prompt_add
(MSG_scratch_size
, NULL
, buf
, sizeof
(buf
));
94 if (size
> 0 && size
< map.blk
[j
].pmPartBlkCnt
) {
97 memcpy
(&map.blk
[k
], &map.blk
[j
],
98 sizeof
(struct apple_part_map_entry
));
99 free_size
= map.blk
[j
].pmPartBlkCnt
- size
;
100 strcpy
(map.blk
[j
].pmPartType
, "Apple_Scratch");
101 map.blk
[j
].pmPartBlkCnt
= size
;
102 map.blk
[j
].pmDataCnt
= size
;
103 bzb
= (EBZB
*)&map.blk
[j
].pmBootArgs
[0];
105 bzb
->mount_point[0] = '\0';
106 strcpy
(map.blk
[k
].pmPartType
, "Apple_Free");
107 map.blk
[k
].pmPyPartStart
+= size
;
108 if ((map.blk
[k
].pmPyPartStart
+ free_size
) > dlsize
)
109 map.blk
[k
].pmPartBlkCnt
=
110 dlsize
- map.blk
[k
].pmPyPartStart
;
112 map.blk
[k
].pmPartBlkCnt
= free_size
;
113 map.blk
[k
].pmDataCnt
= map.blk
[k
].pmPartBlkCnt
;
114 bzb
= (EBZB
*)&map.blk
[k
].pmBootArgs
[0];
116 bzb
->mount_point[0] = '\0';
117 map.in_use_cnt
+= 1; /* Count new part as usable */
120 msg_display
(MSG_diskfull
);
121 process_menu
(MENU_okabort
, NULL
);
124 map.size
= NEW_MAP_SIZE
;
125 map.in_use_cnt
= new_map
[0].pmMapBlkCnt
;
126 map.blk
= (struct apple_part_map_entry
*)calloc
(map.size
,
127 sizeof
(struct apple_part_map_entry
));
128 for (i
=0;i
<map.size
;i
++)
129 memcpy
(&map.blk
[i
], &new_map
[i
],
130 sizeof
(struct apple_part_map_entry
));
131 map.blk
[0].pmSigPad
= 0; /* Don't rewrite Block0 */
135 option
"Napraw wybrana partycje", action
{
136 int i
= map.mblk
[map.selected
];
137 EBZB
*bzb
= (EBZB
*)&map.blk
[i
].pmBootArgs
[0];
138 msg_display
(MSG_partdebug
, diskdev
, bzb
->flags.part
,
139 map.blk
[i
].pmPyPartStart
,
140 map.blk
[i
].pmPartBlkCnt
);
141 if ((map.blk
[i
].pmPyPartStart
+
142 map.blk
[i
].pmPartBlkCnt
) > dlsize
) {
143 msg_display_add
(MSG_parttable_fix_fixing
,
144 diskdev
, bzb
->flags.part
);
145 map.blk
[i
].pmPartBlkCnt
=
146 dlsize
- map.blk
[i
].pmPyPartStart
;
147 map.blk
[i
].pmDataCnt
=
148 map.blk
[i
].pmPartBlkCnt
;
150 msg_display_add
(MSG_parttable_fix_fine
,
151 diskdev
, bzb
->flags.part
);
153 process_menu
(MENU_ok
, NULL
);
157 menu ok2
, title
"Przerwac?", y
=17;
158 option
"OK", exit, action
{ };
160 menu okabort
, title
"Co chcesz zrobic?";
161 option
"OK", exit, action
{ yesno
= 1; };
162 option
"Przerwac instalacje", exit, action
{ yesno
= 0; };
164 menu chooseid
, title
"Rodzaj partycji?";
165 option
"NetBSD Root", exit, action
{
169 j
= map.mblk
[map.selected
];
170 reset_part_flags
(&map.blk
[j
]);
171 bzb
= (EBZB
*)&map.blk
[j
].pmBootArgs
[0];
172 bzb
->magic = APPLE_BZB_MAGIC
;
173 strcpy
(map.blk
[j
].pmPartName
, "NetBSD Root");
174 strcpy
(map.blk
[j
].pmPartType
, "Apple_Unix_SVR2");
175 bzb
->type = APPLE_BZB_TYPEFS
;
178 * Automatically determine root mount points
. The first
179 * root
-type filesystem is mounted on
"/", all others
180 * will mount on
"/altroot". If there are multiple
181 * occurances of
"/altroot" they will be picked up on
182 * the sanity_scan
in the
next step of the installation
.
184 for (i
=0,map.root_cnt
=0;i
<map.usable_cnt
;i
++) {
186 if (whichType
(&map.blk
[j
]) == ROOT_PART
) {
187 bzb
= (EBZB
*)&map.blk
[j
].pmBootArgs
[0];
188 if (bzb
->type == APPLE_BZB_TYPEFS
&& bzb
->flags.root
) {
189 if (map.root_cnt
++ == 0)
190 strcpy
(bzb
->mount_point, "/");
192 strcpy
(bzb
->mount_point, "/altroot");
196 option
"NetBSD SWAP", exit, action
{
200 j
= map.mblk
[map.selected
];
201 reset_part_flags
(&map.blk
[j
]);
202 bzb
= (EBZB
*)&map.blk
[j
].pmBootArgs
[0];
203 bzb
->magic = APPLE_BZB_MAGIC
;
204 strcpy
(map.blk
[j
].pmPartName
, "NetBSD SWAP");
205 strcpy
(map.blk
[j
].pmPartType
, "Apple_Unix_SVR2");
206 bzb
->type = APPLE_BZB_TYPESWAP
; };
207 option
"NetBSD Usr", exit, action
{
211 j
= map.mblk
[map.selected
];
212 reset_part_flags
(&map.blk
[j
]);
213 bzb
= (EBZB
*)&map.blk
[j
].pmBootArgs
[0];
214 bzb
->magic = APPLE_BZB_MAGIC
;
215 strcpy
(map.blk
[j
].pmPartName
, "NetBSD Usr");
216 strcpy
(map.blk
[j
].pmPartType
, "Apple_Unix_SVR2");
217 bzb
->type = APPLE_BZB_TYPEFS
;
219 if (map.usr_cnt
++ == 0)
220 strcpy
(bzb
->mount_point, "/usr");
222 option
"NetBSD Root&Usr", exit, action
{
226 j
= map.mblk
[map.selected
];
227 reset_part_flags
(&map.blk
[j
]);
228 bzb
= (EBZB
*)&map.blk
[j
].pmBootArgs
[0];
229 bzb
->magic = APPLE_BZB_MAGIC
;
230 strcpy
(map.blk
[j
].pmPartName
, "NetBSD Root & Usr");
231 strcpy
(map.blk
[j
].pmPartType
, "Apple_Unix_SVR2");
232 bzb
->type = APPLE_BZB_TYPEFS
;
235 if (map.root_cnt
++ == 0)
236 strcpy
(bzb
->mount_point, "/");
238 if (map.usr_cnt
++ == 0)
239 strcpy
(bzb
->mount_point, "/usr");
241 option
"MacOS HFS", exit, action
{
245 j
= map.mblk
[map.selected
];
246 reset_part_flags
(&map.blk
[j
]);
247 bzb
= (EBZB
*)&map.blk
[j
].pmBootArgs
[0];
249 bzb
->mount_point[0] = '\0';
250 strcpy
(map.blk
[j
].pmPartName
, "untitled (HFS)");
251 strcpy
(map.blk
[j
].pmPartType
, "Apple_HFS"); };
252 option
"Scratch", exit, action
{
256 j
= map.mblk
[map.selected
];
257 reset_part_flags
(&map.blk
[j
]);
258 bzb
= (EBZB
*)&map.blk
[j
].pmBootArgs
[0];
260 bzb
->mount_point[0] = '\0';
261 strcpy
(map.blk
[j
].pmPartName
, "untitled (Scratch)");
262 strcpy
(map.blk
[j
].pmPartType
, "Apple_Scratch"); };
263 option
"Free", exit, action
{
267 j
= map.mblk
[map.selected
];
268 reset_part_flags
(&map.blk
[j
]);
269 bzb
= (EBZB
*)&map.blk
[j
].pmBootArgs
[0];
271 bzb
->mount_point[0] = '\0';
272 strcpy
(map.blk
[j
].pmPartName
, "untitled (Free)");
273 strcpy
(map.blk
[j
].pmPartType
, "Apple_Free"); };
275 menu mount_point
, title
"Punkt montazu?";
276 option
"/usr", exit, action
{
280 j
= map.mblk
[map.selected
];
281 bzb
= (EBZB
*)&map.blk
[j
].pmBootArgs
[0];
282 strcpy
(bzb
->mount_point, "/usr"); };
283 option
"/home", exit, action
{
287 j
= map.mblk
[map.selected
];
288 bzb
= (EBZB
*)&map.blk
[j
].pmBootArgs
[0];
289 strcpy
(bzb
->mount_point, "/home"); };
290 option
"/var", exit, action
{
294 j
= map.mblk
[map.selected
];
295 bzb
= (EBZB
*)&map.blk
[j
].pmBootArgs
[0];
296 strcpy
(bzb
->mount_point, "/var"); };
297 option
"/tmp", exit, action
{
301 j
= map.mblk
[map.selected
];
302 bzb
= (EBZB
*)&map.blk
[j
].pmBootArgs
[0];
303 strcpy
(bzb
->mount_point, "/tmp"); };
304 option
"Zaden", exit, action
{
308 j
= map.mblk
[map.selected
];
309 bzb
= (EBZB
*)&map.blk
[j
].pmBootArgs
[0];
310 bzb
->mount_point[0] = '\0'; };
311 option
"inny", exit, action
{
316 msg_display
(MSG_custom_mount_point
);
317 msg_prompt_add
(MSG_mountpoint
, NULL
, buf
, sizeof
(buf
));
318 j
= map.mblk
[map.selected
];
319 bzb
= (EBZB
*)&map.blk
[j
].pmBootArgs
[0];
320 if (buf
[0] != '\0') {
321 bzb
->mount_point[0] = '\0';
323 strcpy
(bzb
->mount_point, "/");
324 strcat
(bzb
->mount_point, buf
);
327 menu sanity
, title
"Wybierz opcje";
328 display action
{msg_display
(MSG_sanity_check
);
330 option
"Przerwij instalacje", exit, action
{yesno
= -1; };
331 option
"Zignoruj ostrzezenia i kontynuuj", exit, action
{yesno
= 1;};
332 option
"Ponownie wyedytuj mape partycji dysku", exit, action
{yesno
= 0; };
335 * This menu shouldn
't be used in the mac68k port, but it needs to be
336 * defined because it's referenced from the toplevel code
.