sade.h revision 15439
1/*
2 * The new sysinstall program.
3 *
4 * This is probably the last attempt in the `sysinstall' line, the next
5 * generation being slated to essentially a complete rewrite.
6 *
7 * $Id: sysinstall.h,v 1.54 1996/04/28 01:07:26 jkh Exp $
8 *
9 * Copyright (c) 1995
10 *	Jordan Hubbard.  All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 *    notice, this list of conditions and the following disclaimer,
17 *    verbatim and that no modifications are made prior to this
18 *    point in the file.
19 * 2. Redistributions in binary form must reproduce the above copyright
20 *    notice, this list of conditions and the following disclaimer in the
21 *    documentation and/or other materials provided with the distribution.
22 *
23 * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED.  IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 */
36
37#ifndef _SYSINSTALL_H_INCLUDE
38#define _SYSINSTALL_H_INCLUDE
39
40#include <stdio.h>
41#include <stdlib.h>
42#include <string.h>
43#include <unistd.h>
44#include <dialog.h>
45#include <sys/types.h>
46#include <sys/wait.h>
47#include "libdisk.h"
48#include "dist.h"
49#include "version.h"
50
51/*** Defines ***/
52
53/* variable limits */
54#define VAR_NAME_MAX		128
55#define VAR_VALUE_MAX		1024
56
57/* device limits */
58#define DEV_NAME_MAX		64	/* The maximum length of a device name	*/
59#define DEV_MAX			100	/* The maximum number of devices we'll deal with */
60#define INTERFACE_MAX		50	/* Maximum number of network interfaces we'll deal with */
61#define MAX_FTP_RETRIES		"4"	/* How many times to beat our heads against the wall */
62
63/*
64 * I make some pretty gross assumptions about having a max of 50 chunks
65 * total - 8 slices and 42 partitions.  I can't easily display many more
66 * than that on the screen at once!
67 *
68 * For 2.1 I'll revisit this and try to make it more dynamic, but since
69 * this will catch 99.99% of all possible cases, I'm not too worried.
70 */
71#define MAX_CHUNKS	40
72
73/* Internal environment variable names */
74#define DISK_PARTITIONED	"_diskPartitioned"
75#define DISK_LABELLED		"_diskLabelled"
76#define DISK_SELECTED		"_diskSelected"
77#define SYSTEM_STATE		"_systemState"
78#define RUNNING_ON_ROOT		"_runningOnRoot"
79#define TCP_CONFIGURED		"_tcpConfigured"
80
81/* Ones that can be tweaked from config files */
82#define VAR_BLANKTIME			"blanktime"
83#define VAR_BOOTMGR			"bootManager"
84#define VAR_BROWSER_BINARY		"browserBinary"
85#define VAR_BROWSER_PACKAGE		"browserPackage"
86#define VAR_CONFIG_FILE			"configFile"
87#define VAR_CPIO_VERBOSITY		"cpioVerbose"
88#define VAR_DEBUG			"debug"
89#define VAR_DISK			"disk"
90#define VAR_DISKSPACE			"diskSpace"
91#define VAR_DOMAINNAME			"domainname"
92#define VAR_EDITOR			"editor"
93#define VAR_EXTRAS			"ifconfig_"
94#define VAR_FTP_ONERROR			"ftpOnError"
95#define VAR_FTP_PASS			"ftpPass"
96#define VAR_FTP_PATH			"ftp"
97#define VAR_FTP_RETRIES			"ftpRetryCount"
98#define VAR_FTP_STATE			"ftpState"
99#define VAR_FTP_USER			"ftpUser"
100#define VAR_GATEWAY			"defaultrouter"
101#define VAR_GEOMETRY			"geometry"
102#define VAR_HOSTNAME			"hostname"
103#define VAR_IFCONFIG			"ifconfig_"
104#define VAR_INTERFACES			"network_interfaces"
105#define VAR_IPADDR			"ipaddr"
106#define VAR_LABEL			"label"
107#define VAR_LABEL_COUNT			"labelCount"
108#define VAR_MEDIA_TYPE			"mediaType"
109#define VAR_NAMESERVER			"nameserver"
110#define VAR_NETMASK			"netmask"
111#define VAR_NFS_PATH			"nfs"
112#define VAR_NFS_SECURE			"nfsSecure"
113#define VAR_NO_CONFIRM			"noConfirm"
114#define VAR_NTPDATE			"ntpDate"
115#define VAR_PORTS_PATH			"ports"
116#define VAR_RELNAME			"releaseName"
117#define VAR_ROOT_SIZE			"rootSize"
118#define VAR_ROUTEDFLAGS			"routedflags"
119#define VAR_SLOW_ETHER			"slowEthernetCard"
120#define VAR_SWAP_SIZE			"swapSize"
121#define VAR_TAPE_BLOCKSIZE		"tapeBlocksize"
122#define VAR_UFS_PATH			"ufs"
123#define VAR_USR_SIZE			"usrSize"
124#define VAR_VAR_SIZE			"varSize"
125#define VAR_SERIAL_SPEED		"serialSpeed"
126
127#define DEFAULT_TAPE_BLOCKSIZE	"20"
128
129/* One MB worth of blocks */
130#define ONE_MEG				2048
131
132/*** Types ***/
133typedef unsigned int Boolean;
134typedef struct disk Disk;
135typedef struct chunk Chunk;
136
137/* Bitfields for menu options */
138#define DMENU_NORMAL_TYPE	0x1     /* Normal dialog menu           */
139#define DMENU_RADIO_TYPE	0x2     /* Radio dialog menu            */
140#define DMENU_CHECKLIST_TYPE	0x4     /* Multiple choice menu         */
141#define DMENU_SELECTION_RETURNS 0x8     /* Immediate return on item selection */
142
143typedef struct _dmenu {
144    int type;				/* What sort of menu we are	*/
145    char *title;			/* Our title			*/
146    char *prompt;			/* Our prompt			*/
147    char *helpline;			/* Line of help at bottom	*/
148    char *helpfile;			/* Help file for "F1"		*/
149    dialogMenuItem items[0];		/* Array of menu items		*/
150} DMenu;
151
152/* A sysconfig variable */
153typedef struct _variable {
154    struct _variable *next;
155    char name[VAR_NAME_MAX];
156    char value[VAR_VALUE_MAX];
157} Variable;
158
159/* For attribs */
160#define MAX_ATTRIBS	200
161#define MAX_NAME	64
162#define MAX_VALUE	256
163
164typedef struct _attribs {
165    char name[MAX_NAME];
166    char value[MAX_VALUE];
167} Attribs;
168
169typedef enum {
170    DEVICE_TYPE_NONE,
171    DEVICE_TYPE_DISK,
172    DEVICE_TYPE_FLOPPY,
173    DEVICE_TYPE_FTP,
174    DEVICE_TYPE_NETWORK,
175    DEVICE_TYPE_CDROM,
176    DEVICE_TYPE_TAPE,
177    DEVICE_TYPE_DOS,
178    DEVICE_TYPE_UFS,
179    DEVICE_TYPE_NFS,
180    DEVICE_TYPE_ANY,
181} DeviceType;
182
183/* A "device" from sysinstall's point of view */
184typedef struct _device {
185    char name[DEV_NAME_MAX];
186    char *description;
187    char *devname;
188    DeviceType type;
189    Boolean enabled;
190    Boolean (*init)(struct _device *dev);
191    int (*get)(struct _device *dev, char *file, Boolean probe);
192    Boolean (*close)(struct _device *dev, int fd);
193    void (*shutdown)(struct _device *dev);
194    void *private;
195    unsigned int flags;
196} Device;
197
198/* Some internal representations of partitions */
199typedef enum {
200    PART_NONE,
201    PART_SLICE,
202    PART_SWAP,
203    PART_FILESYSTEM,
204    PART_FAT,
205} PartType;
206
207/* The longest newfs command we'll hand to system() */
208#define NEWFS_CMD_MAX	256
209
210typedef struct _part_info {
211    Boolean newfs;
212    char mountpoint[FILENAME_MAX];
213    char newfs_cmd[NEWFS_CMD_MAX];
214} PartInfo;
215
216/* An option */
217typedef struct _opt {
218    char *name;
219    char *desc;
220    enum { OPT_IS_STRING, OPT_IS_INT, OPT_IS_FUNC, OPT_IS_VAR } type;
221    void *data;
222    void *aux;
223    char *(*check)();
224} Option;
225
226/* Weird index nodey things we use for keeping track of package information */
227typedef enum { PACKAGE, PLACE } node_type;	/* Types of nodes */
228
229typedef struct _pkgnode {	/* A node in the reconstructed hierarchy */
230    struct _pkgnode *next;	/* My next sibling			*/
231    node_type type;		/* What am I?				*/
232    char *name;			/* My name				*/
233    char *desc;			/* My description (Hook)		*/
234    struct _pkgnode *kids;	/* My little children			*/
235    void *data;			/* A place to hang my data		*/
236} PkgNode;
237typedef PkgNode *PkgNodePtr;
238
239/* A single package */
240typedef struct _indexEntry {	/* A single entry in an INDEX file */
241    char *name;			/* name				*/
242    char *path;			/* full path to port		*/
243    char *prefix;		/* port prefix			*/
244    char *comment;		/* one line description		*/
245    char *descrfile;		/* path to description file	*/
246    char *deps;			/* packages this depends on	*/
247    char *maintainer;		/* maintainer			*/
248} IndexEntry;
249typedef IndexEntry *IndexEntryPtr;
250
251typedef int (*commandFunc)(char *key, void *data);
252
253#define HOSTNAME_FIELD_LEN	128
254#define IPADDR_FIELD_LEN	16
255#define EXTRAS_FIELD_LEN	128
256
257/* This is the structure that Network devices carry around in their private, erm, structures */
258typedef struct _devPriv {
259    char ipaddr[IPADDR_FIELD_LEN];
260    char netmask[IPADDR_FIELD_LEN];
261    char extras[EXTRAS_FIELD_LEN];
262} DevInfo;
263
264
265/*** Externs ***/
266extern int		DebugFD;		/* Where diagnostic output goes			*/
267extern Boolean		Fake;			/* Don't actually modify anything - testing	*/
268extern Boolean		SystemWasInstalled;	/* Did we install it?				*/
269extern Boolean		RunningAsInit;		/* Are we running stand-alone?			*/
270extern Boolean		DialogActive;		/* Is the dialog() stuff up?			*/
271extern Boolean		ColorDisplay;		/* Are we on a color display?			*/
272extern Boolean		OnVTY;			/* On a syscons VTY?				*/
273extern Variable		*VarHead;		/* The head of the variable chain		*/
274extern Device		*mediaDevice;		/* Where we're getting our distribution from	*/
275extern unsigned int	Dists;			/* Which distributions we want			*/
276extern unsigned int	DESDists;		/* Which naughty distributions we want		*/
277extern unsigned int	SrcDists;		/* Which src distributions we want		*/
278extern unsigned int	XF86Dists;		/* Which XFree86 dists we want			*/
279extern unsigned int	XF86ServerDists;	/* The XFree86 servers we want			*/
280extern unsigned int	XF86FontDists;		/* The XFree86 fonts we want			*/
281extern int		BootMgr;		/* Which boot manager to use 			*/
282
283
284extern DMenu		MenuInitial;		/* Initial installation menu			*/
285extern DMenu		MenuFixit;		/* Fixit repair menu				*/
286extern DMenu		MenuMBRType;		/* Type of MBR to write on the disk		*/
287extern DMenu		MenuConfigure;		/* Final configuration menu			*/
288extern DMenu		MenuDocumentation;	/* Documentation menu				*/
289extern DMenu		MenuFTPOptions;		/* FTP Installation options			*/
290extern DMenu		MenuOptions;		/* Installation options				*/
291extern DMenu		MenuOptionsLanguage;	/* Language options menu			*/
292extern DMenu		MenuMedia;		/* Media type menu				*/
293extern DMenu		MenuMouse;		/* Mouse type menu				*/
294extern DMenu		MenuMediaCDROM;		/* CDROM media menu				*/
295extern DMenu		MenuMediaDOS;		/* DOS media menu				*/
296extern DMenu		MenuMediaFloppy;	/* Floppy media menu				*/
297extern DMenu		MenuMediaFTP;		/* FTP media menu				*/
298extern DMenu		MenuMediaTape;		/* Tape media menu				*/
299extern DMenu		MenuNetworkDevice;	/* Network device menu				*/
300extern DMenu		MenuNTP;		/* NTP time server menu				*/
301extern DMenu		MenuSyscons;		/* System console configuration menu		*/
302extern DMenu		MenuSysconsKeymap;	/* System console keymap configuration menu	*/
303extern DMenu		MenuSysconsKeyrate;	/* System console keyrate configuration menu	*/
304extern DMenu		MenuSysconsSaver;	/* System console saver configuration menu	*/
305extern DMenu		MenuNetworking;		/* Network configuration menu			*/
306extern DMenu		MenuInstallCustom;	/* Custom Installation menu			*/
307extern DMenu		MenuDistributions;	/* Distribution menu				*/
308extern DMenu		MenuSubDistributions;	/* Custom distribution menu			*/
309extern DMenu		MenuDESDistributions;	/* DES distribution menu			*/
310extern DMenu		MenuSrcDistributions;	/* Source distribution menu			*/
311extern DMenu		MenuXF86;		/* XFree86 main menu				*/
312extern DMenu		MenuXF86Select;		/* XFree86 distribution selection menu		*/
313extern DMenu		MenuXF86SelectCore;	/* XFree86 core distribution menu		*/
314extern DMenu		MenuXF86SelectServer;	/* XFree86 server distribution menu		*/
315extern DMenu		MenuXF86SelectFonts;	/* XFree86 font selection menu			*/
316extern DMenu		MenuDiskDevices;	/* Disk devices menu				*/
317extern DMenu		MenuHTMLDoc;		/* HTML Documentation menu			*/
318
319
320/*** Prototypes ***/
321
322/* apache.c */
323extern int	configApache(dialogMenuItem *self);
324
325/* anonFTP.c */
326extern int	configAnonFTP(dialogMenuItem *self);
327
328/* attrs.c */
329extern char	*attr_match(Attribs *attr, char *name);
330extern int	attr_parse_file(Attribs *attr, char *file);
331extern int	attr_parse(Attribs *attr, int fd);
332
333/* cdrom.c */
334extern Boolean	mediaInitCDROM(Device *dev);
335extern int	mediaGetCDROM(Device *dev, char *file, Boolean probe);
336extern void	mediaShutdownCDROM(Device *dev);
337
338/* command.c */
339extern void	command_clear(void);
340extern void	command_sort(void);
341extern void	command_execute(void);
342extern void	command_shell_add(char *key, char *fmt, ...);
343extern void	command_func_add(char *key, commandFunc func, void *data);
344
345/* config.c */
346extern int	configFstab(void);
347extern void	configSysconfig(void);
348extern void	configResolv(void);
349extern int	configPorts(dialogMenuItem *self);
350extern int	configPackages(dialogMenuItem *self);
351extern int	configSaverTimeout(dialogMenuItem *self);
352extern int	configNTP(dialogMenuItem *self);
353extern int	configXFree86(dialogMenuItem *self);
354extern int	configRoutedFlags(dialogMenuItem *self);
355
356/* crc.c */
357extern int	crc(int, unsigned long *, unsigned long *);
358
359/* devices.c */
360extern DMenu	*deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)(dialogMenuItem *d),
361				  int (*check)(dialogMenuItem *d));
362extern void	deviceGetAll(void);
363extern Device	**deviceFind(char *name, DeviceType type);
364extern int	deviceCount(Device **devs);
365extern Device	*new_device(char *name);
366extern Device	*deviceRegister(char *name, char *desc, char *devname, DeviceType type, Boolean enabled,
367				Boolean (*init)(Device *mediadev), int (*get)(Device *dev, char *file, Boolean probe),
368				Boolean (*close)(Device *mediadev, int fd), void (*shutDown)(Device *mediadev),
369				void *private);
370extern Boolean	dummyInit(Device *dev);
371extern int	dummyGet(Device *dev, char *dist, Boolean probe);
372extern Boolean	dummyClose(Device *dev, int fd);
373extern void	dummyShutdown(Device *dev);
374
375/* disks.c */
376extern int	diskPartitionEditor(dialogMenuItem *self);
377extern int	diskPartitionWrite(dialogMenuItem *self);
378extern void	diskPartition(Device *dev, Disk *d);
379
380/* dist.c */
381extern int	distReset(dialogMenuItem *self);
382extern int	distSetCustom(char *str);
383extern int	distSetDeveloper(dialogMenuItem *self);
384extern int	distSetXDeveloper(dialogMenuItem *self);
385extern int	distSetKernDeveloper(dialogMenuItem *self);
386extern int	distSetUser(dialogMenuItem *self);
387extern int	distSetXUser(dialogMenuItem *self);
388extern int	distSetMinimum(dialogMenuItem *self);
389extern int	distSetEverything(dialogMenuItem *self);
390extern int	distSetDES(dialogMenuItem *self);
391extern int	distSetSrc(dialogMenuItem *self);
392extern int	distSetXF86(dialogMenuItem *self);
393extern int	distExtractAll(dialogMenuItem *self);
394
395/* dmenu.c */
396extern int	dmenuDisplayFile(dialogMenuItem *tmp);
397extern int	dmenuSubmenu(dialogMenuItem *tmp);
398extern int	dmenuSystemCommand(dialogMenuItem *tmp);
399extern int	dmenuSystemCommandBox(dialogMenuItem *tmp);
400extern int	dmenuExit(dialogMenuItem *tmp);
401extern int	dmenuSetVariable(dialogMenuItem *tmp);
402extern int	dmenuSetFlag(dialogMenuItem *tmp);
403extern int	dmenuSetValue(dialogMenuItem *tmp);
404extern Boolean	dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max);
405extern Boolean	dmenuOpenSimple(DMenu *menu);
406extern int	dmenuVarCheck(dialogMenuItem *item);
407extern int	dmenuFlagCheck(dialogMenuItem *item);
408extern int	dmenuRadioCheck(dialogMenuItem *item);
409
410/* doc.c */
411extern int	docBrowser(dialogMenuItem *self);
412extern int	docShowDocument(dialogMenuItem *self);
413
414/* dos.c */
415extern Boolean	mediaInitDOS(Device *dev);
416extern int	mediaGetDOS(Device *dev, char *file, Boolean probe);
417extern void	mediaShutdownDOS(Device *dev);
418
419/* floppy.c */
420extern int	getRootFloppy(void);
421extern Boolean	mediaInitFloppy(Device *dev);
422extern int	mediaGetFloppy(Device *dev, char *file, Boolean probe);
423extern void	mediaShutdownFloppy(Device *dev);
424
425/* ftp_strat.c */
426extern Boolean	mediaCloseFTP(Device *dev, int fd);
427extern Boolean	mediaInitFTP(Device *dev);
428extern int	mediaGetFTP(Device *dev, char *file, Boolean probe);
429extern void	mediaShutdownFTP(Device *dev);
430
431/* globals.c */
432extern void	globalsInit(void);
433
434/* index.c */
435int		index_get(char *fname, PkgNodePtr papa);
436int		index_read(int fd, PkgNodePtr papa);
437int		index_menu(PkgNodePtr top, PkgNodePtr plist, int *pos, int *scroll);
438void		index_init(PkgNodePtr top, PkgNodePtr plist);
439void		index_node_free(PkgNodePtr top, PkgNodePtr plist);
440void		index_sort(PkgNodePtr top);
441void		index_print(PkgNodePtr top, int level);
442int		index_extract(Device *dev, PkgNodePtr top, PkgNodePtr plist);
443
444/* install.c */
445extern int	installCommit(dialogMenuItem *self);
446extern int	installExpress(dialogMenuItem *self);
447extern int	installNovice(dialogMenuItem *self);
448extern int	installFixitCDROM(dialogMenuItem *self);
449extern int	installFixitFloppy(dialogMenuItem *self);
450extern int	installFixup(dialogMenuItem *self);
451extern int	installUpgrade(dialogMenuItem *self);
452extern int	installFilesystems(dialogMenuItem *self);
453extern int	installVarDefaults(dialogMenuItem *self);
454extern Boolean	copySelf(void);
455extern Boolean	rootExtract(void);
456
457/* installFinal.c */
458extern int	configGated(dialogMenuItem *self);
459extern int	configSamba(dialogMenuItem *self);
460extern int	configPCNFSD(dialogMenuItem *self);
461extern int	configNFSServer(dialogMenuItem *self);
462
463/* label.c */
464extern int	diskLabelEditor(dialogMenuItem *self);
465extern int	diskLabelCommit(dialogMenuItem *self);
466
467/* lndir.c */
468extern int	lndir(char *from, char *to);
469
470/* makedevs.c (auto-generated) */
471extern const char	termcap_vt100[];
472extern const char	termcap_cons25[];
473extern const char	termcap_cons25_m[];
474extern const char	termcap_cons25r[];
475extern const char	termcap_cons25r_m[];
476extern const char	termcap_cons25l1[];
477extern const char	termcap_cons25l1_m[];
478extern const u_char	font_iso_8x16[];
479extern const u_char	font_cp850_8x16[];
480extern const u_char	font_cp866_8x16[];
481extern const u_char	koi8_r2cp866[];
482extern u_char		default_scrnmap[];
483
484/* media.c */
485extern char	*cpioVerbosity(void);
486extern int	mediaSetCDROM(dialogMenuItem *self);
487extern int	mediaSetFloppy(dialogMenuItem *self);
488extern int	mediaSetDOS(dialogMenuItem *self);
489extern int	mediaSetTape(dialogMenuItem *self);
490extern int	mediaSetFTP(dialogMenuItem *self);
491extern int	mediaSetFTPActive(dialogMenuItem *self);
492extern int	mediaSetFTPPassive(dialogMenuItem *self);
493extern int	mediaSetUFS(dialogMenuItem *self);
494extern int	mediaSetNFS(dialogMenuItem *self);
495extern int	mediaSetFtpOnError(dialogMenuItem *self);
496extern int	mediaSetFtpUserPass(dialogMenuItem *self);
497extern int	mediaSetCPIOVerbosity(dialogMenuItem *self);
498extern int	mediaGetType(dialogMenuItem *self);
499extern Boolean	mediaExtractDist(char *dir, int fd);
500extern Boolean	mediaExtractDistBegin(char *dir, int *fd, int *zpid, int *cpic);
501extern Boolean	mediaExtractDistEnd(int zpid, int cpid);
502extern Boolean	mediaVerify(void);
503
504/* misc.c */
505extern Boolean	file_readable(char *fname);
506extern Boolean	file_executable(char *fname);
507extern Boolean	directory_exists(const char *dirname);
508extern char	*string_concat(char *p1, char *p2);
509extern char	*string_concat3(char *p1, char *p2, char *p3);
510extern char	*string_prune(char *str);
511extern char	*string_skipwhite(char *str);
512extern char	*string_copy(char *s1, char *s2);
513extern char	*pathBaseName(const char *path);
514extern void	safe_free(void *ptr);
515extern void	*safe_malloc(size_t size);
516extern void	*safe_realloc(void *orig, size_t size);
517extern dialogMenuItem *item_add(dialogMenuItem *list, char *prompt, char *title,
518				int (*checked)(dialogMenuItem *self),
519				int (*fire)(dialogMenuItem *self),
520				void (*selected)(dialogMenuItem *self, int is_selected),
521				void *data, int aux, int *curr, int *max);
522extern void	items_free(dialogMenuItem *list, int *curr, int *max);
523extern int	Mkdir(char *, void *data);
524extern int	Mount(char *, void *data);
525extern WINDOW	*savescr(void);
526extern void	restorescr(WINDOW *w);
527
528/* msg.c */
529extern Boolean	isDebug(void);
530extern void	msgInfo(char *fmt, ...);
531extern void	msgYap(char *fmt, ...);
532extern void	msgWarn(char *fmt, ...);
533extern void	msgDebug(char *fmt, ...);
534extern void	msgError(char *fmt, ...);
535extern void	msgFatal(char *fmt, ...);
536extern void	msgConfirm(char *fmt, ...);
537extern void	msgNotify(char *fmt, ...);
538extern void	msgWeHaveOutput(char *fmt, ...);
539extern int	msgYesNo(char *fmt, ...);
540extern char	*msgGetInput(char *buf, char *fmt, ...);
541extern int	msgSimpleConfirm(char *);
542extern int	msgSimpleNotify(char *);
543
544/* network.c */
545extern Boolean	mediaInitNetwork(Device *dev);
546extern void	mediaShutdownNetwork(Device *dev);
547
548/* nfs.c */
549extern Boolean	mediaInitNFS(Device *dev);
550extern int	mediaGetNFS(Device *dev, char *file, Boolean probe);
551extern void	mediaShutdownNFS(Device *dev);
552
553/* options.c */
554extern int	optionsEditor(dialogMenuItem *self);
555
556/* package.c */
557extern int	package_add(char *name);
558extern int	package_extract(Device *dev, char *name, Boolean depended);
559
560/* system.c */
561extern void	systemInitialize(int argc, char **argv);
562extern void	systemShutdown(void);
563extern int	execExecute(char *cmd, char *name);
564extern int	systemExecute(char *cmd);
565extern int	systemDisplayHelp(char *file);
566extern char	*systemHelpFile(char *file, char *buf);
567extern void	systemChangeFont(const u_char font[]);
568extern void	systemChangeLang(char *lang);
569extern void	systemChangeTerminal(char *color, const u_char c_termcap[], char *mono, const u_char m_termcap[]);
570extern void	systemChangeScreenmap(const u_char newmap[]);
571extern void	systemCreateHoloshell(void);
572extern int	vsystem(char *fmt, ...);
573
574/* tape.c */
575extern char	*mediaTapeBlocksize(void);
576extern Boolean	mediaInitTape(Device *dev);
577extern int	mediaGetTape(Device *dev, char *file, Boolean probe);
578extern void	mediaShutdownTape(Device *dev);
579
580/* tcpip.c */
581extern int	tcpOpenDialog(Device *dev);
582extern int	tcpMenuSelect(dialogMenuItem *self);
583extern int	tcpInstallDevice(char *str);
584extern Boolean	tcpDeviceSelect(void);
585
586/* termcap.c */
587extern int	set_termcap(void);
588
589/* ufs.c */
590extern void	mediaShutdownUFS(Device *dev);
591extern Boolean	mediaInitUFS(Device *dev);
592extern int	mediaGetUFS(Device *dev, char *file, Boolean probe);
593
594/* variable.c */
595extern void	variable_set(char *var);
596extern void	variable_set2(char *name, char *value);
597extern char 	*variable_get(char *var);
598extern void	variable_unset(char *var);
599extern char	*variable_get_value(char *var, char *prompt);
600
601/* wizard.c */
602extern void	slice_wizard(Disk *d);
603
604#endif
605/* _SYSINSTALL_H_INCLUDE */
606