1995-04-27 14:50:35 +02:00
|
|
|
/*
|
|
|
|
* The new sysinstall program.
|
|
|
|
*
|
|
|
|
* This is probably the last attempt in the `sysinstall' line, the next
|
|
|
|
* generation being slated to essentially a complete rewrite.
|
|
|
|
*
|
1995-09-18 18:53:06 +02:00
|
|
|
* $Id: sysinstall.h,v 1.42.2.1 1995/07/21 10:54:06 rgrimes Exp $
|
1995-04-27 14:50:35 +02:00
|
|
|
*
|
|
|
|
* Copyright (c) 1995
|
|
|
|
* Jordan Hubbard. All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
1995-05-30 10:29:07 +02:00
|
|
|
* notice, this list of conditions and the following disclaimer,
|
|
|
|
* verbatim and that no modifications are made prior to this
|
1995-04-27 14:50:35 +02:00
|
|
|
* point in the file.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
* 3. All advertising materials mentioning features or use of this software
|
|
|
|
* must display the following acknowledgement:
|
|
|
|
* This product includes software developed by Jordan Hubbard
|
|
|
|
* for the FreeBSD Project.
|
|
|
|
* 4. The name of Jordan Hubbard or the FreeBSD project may not be used to
|
|
|
|
* endorse or promote products derived from this software without specific
|
|
|
|
* prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _SYSINSTALL_H_INCLUDE
|
|
|
|
#define _SYSINSTALL_H_INCLUDE
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <dialog.h>
|
1995-05-05 01:36:23 +02:00
|
|
|
#include "libdisk.h"
|
1995-05-10 09:45:00 +02:00
|
|
|
#include "dist.h"
|
1995-04-27 14:50:35 +02:00
|
|
|
|
1995-05-01 23:56:32 +02:00
|
|
|
/*** Defines ***/
|
|
|
|
|
1995-04-29 21:33:06 +02:00
|
|
|
/* Bitfields for menu options */
|
|
|
|
#define DMENU_NORMAL_TYPE 0x1 /* Normal dialog menu */
|
|
|
|
#define DMENU_RADIO_TYPE 0x2 /* Radio dialog menu */
|
|
|
|
#define DMENU_MULTIPLE_TYPE 0x4 /* Multiple choice menu */
|
|
|
|
#define DMENU_SELECTION_RETURNS 0x8 /* Select item then exit */
|
1995-05-10 09:45:00 +02:00
|
|
|
#define DMENU_CALL_FIRST 0x10 /* In multiple, use one handler */
|
1995-05-04 21:48:19 +02:00
|
|
|
|
1995-05-01 23:56:32 +02:00
|
|
|
/* variable limits */
|
|
|
|
#define VAR_NAME_MAX 128
|
|
|
|
#define VAR_VALUE_MAX 1024
|
|
|
|
|
|
|
|
/* device limits */
|
1995-05-16 04:53:31 +02:00
|
|
|
#define DEV_NAME_MAX 128 /* The maximum length of a device name */
|
|
|
|
#define DEV_MAX 200 /* The maximum number of devices we'll deal with */
|
|
|
|
#define INTERFACE_MAX 50 /* Maximum number of network interfaces we'll deal with */
|
1995-06-11 21:33:05 +02:00
|
|
|
#define MAX_FTP_RETRIES 3 /* How many times to beat our heads against the wall */
|
1995-05-16 04:53:31 +02:00
|
|
|
|
1995-05-23 04:41:18 +02:00
|
|
|
/*
|
|
|
|
* I make some pretty gross assumptions about having a max of 50 chunks
|
|
|
|
* total - 8 slices and 42 partitions. I can't easily display many more
|
|
|
|
* than that on the screen at once!
|
|
|
|
*
|
|
|
|
* For 2.1 I'll revisit this and try to make it more dynamic, but since
|
|
|
|
* this will catch 99.99% of all possible cases, I'm not too worried.
|
|
|
|
*/
|
|
|
|
#define MAX_CHUNKS 50
|
1995-05-16 04:53:31 +02:00
|
|
|
|
|
|
|
/* Internal flag variables */
|
|
|
|
#define DISK_PARTITIONED "_diskPartitioned"
|
|
|
|
#define DISK_LABELLED "_diskLabelled"
|
1995-05-23 20:06:16 +02:00
|
|
|
#define RUNNING_ON_ROOT "_runningOnRoot"
|
1995-05-16 04:53:31 +02:00
|
|
|
#define TCP_CONFIGURED "_tcpConfigured"
|
1995-06-11 21:33:05 +02:00
|
|
|
|
|
|
|
#define FTP_USER "_ftpUser"
|
|
|
|
#define FTP_PASS "_ftpPass"
|
|
|
|
|
|
|
|
#define OPT_NO_CONFIRM 0x0001
|
|
|
|
#define OPT_NFS_SECURE 0x0002
|
|
|
|
#define OPT_DEBUG 0x0004
|
|
|
|
#define OPT_FTP_ACTIVE 0x0008
|
|
|
|
#define OPT_FTP_PASSIVE 0x0010
|
|
|
|
#define OPT_FTP_RESELECT 0x0020
|
|
|
|
#define OPT_FTP_ABORT 0x0040
|
|
|
|
#define OPT_SLOW_ETHER 0x0080
|
|
|
|
#define OPT_EXPLORATORY_GET 0x0100
|
|
|
|
#define OPT_LEAVE_NETWORK_UP 0x0200
|
1995-05-16 04:53:31 +02:00
|
|
|
|
|
|
|
#define VAR_HOSTNAME "hostname"
|
|
|
|
#define VAR_DOMAINNAME "domainname"
|
|
|
|
#define VAR_NAMESERVER "nameserver"
|
1995-05-26 21:28:06 +02:00
|
|
|
#define VAR_GATEWAY "defaultrouter"
|
|
|
|
#define VAR_IPADDR "ipaddr"
|
1995-05-16 04:53:31 +02:00
|
|
|
|
1995-05-17 16:40:00 +02:00
|
|
|
#define VAR_IFCONFIG "ifconfig_"
|
1995-05-26 21:28:06 +02:00
|
|
|
#define VAR_INTERFACES "network_interfaces"
|
1995-05-01 23:56:32 +02:00
|
|
|
|
1995-05-17 16:40:00 +02:00
|
|
|
/* The help file for the TCP/IP setup screen */
|
1995-09-18 18:53:06 +02:00
|
|
|
#define TCP_HELPFILE "tcp"
|
1995-05-01 23:56:32 +02:00
|
|
|
|
|
|
|
/*** Types ***/
|
1995-04-27 14:50:35 +02:00
|
|
|
typedef unsigned int Boolean;
|
1995-05-16 04:53:31 +02:00
|
|
|
typedef struct disk Disk;
|
|
|
|
typedef struct chunk Chunk;
|
1995-04-27 14:50:35 +02:00
|
|
|
|
|
|
|
typedef enum {
|
1995-04-29 21:33:06 +02:00
|
|
|
DMENU_DISPLAY_FILE, /* Display a file's contents */
|
|
|
|
DMENU_SUBMENU, /* Recurse into another menu */
|
|
|
|
DMENU_SYSTEM_COMMAND, /* Run shell commmand */
|
|
|
|
DMENU_SYSTEM_COMMAND_BOX, /* Same as above, but in prgbox */
|
|
|
|
DMENU_SET_VARIABLE, /* Set an environment/system var */
|
1995-05-10 09:45:00 +02:00
|
|
|
DMENU_SET_FLAG, /* Set flag in an unsigned int */
|
1995-06-11 21:33:05 +02:00
|
|
|
DMENU_SET_VALUE, /* Set unsigned int to value */
|
1995-04-29 21:33:06 +02:00
|
|
|
DMENU_CALL, /* Call back a C function */
|
|
|
|
DMENU_CANCEL, /* Cancel out of this menu */
|
1995-05-01 23:56:32 +02:00
|
|
|
DMENU_NOP, /* Do nothing special for item */
|
1995-04-27 14:50:35 +02:00
|
|
|
} DMenuItemType;
|
|
|
|
|
|
|
|
typedef struct _dmenuItem {
|
1995-04-29 21:33:06 +02:00
|
|
|
char *title; /* Our title */
|
|
|
|
char *prompt; /* Our prompt */
|
|
|
|
DMenuItemType type; /* What type of item we are */
|
|
|
|
void *ptr; /* Generic data ptr */
|
1995-05-10 09:45:00 +02:00
|
|
|
u_long parm; /* Parameter for above */
|
1995-05-01 23:56:32 +02:00
|
|
|
Boolean disabled; /* Are we temporarily disabled? */
|
1995-06-11 21:33:05 +02:00
|
|
|
char * (*check)(struct _dmenuItem *); /* Our state */
|
1995-04-27 14:50:35 +02:00
|
|
|
} DMenuItem;
|
|
|
|
|
|
|
|
typedef struct _dmenu {
|
1995-04-29 21:33:06 +02:00
|
|
|
unsigned int options; /* What sort of menu we are */
|
|
|
|
char *title; /* Our title */
|
|
|
|
char *prompt; /* Our prompt */
|
|
|
|
char *helpline; /* Line of help at bottom */
|
|
|
|
char *helpfile; /* Help file for "F1" */
|
|
|
|
DMenuItem items[0]; /* Array of menu items */
|
1995-04-27 14:50:35 +02:00
|
|
|
} DMenu;
|
|
|
|
|
|
|
|
/* A sysconfig variable */
|
|
|
|
typedef struct _variable {
|
|
|
|
struct _variable *next;
|
1995-05-01 23:56:32 +02:00
|
|
|
char name[VAR_NAME_MAX];
|
|
|
|
char value[VAR_VALUE_MAX];
|
1995-04-27 14:50:35 +02:00
|
|
|
} Variable;
|
|
|
|
|
1995-05-27 12:47:44 +02:00
|
|
|
#define MAX_ATTRIBS 200
|
|
|
|
#define MAX_NAME 511
|
|
|
|
#define MAX_VALUE 4095
|
|
|
|
|
|
|
|
typedef struct _attribs {
|
|
|
|
char *name;
|
|
|
|
char *value;
|
|
|
|
} Attribs;
|
|
|
|
|
1995-05-01 23:56:32 +02:00
|
|
|
typedef enum {
|
1995-05-08 23:39:40 +02:00
|
|
|
DEVICE_TYPE_NONE,
|
1995-05-01 23:56:32 +02:00
|
|
|
DEVICE_TYPE_DISK,
|
|
|
|
DEVICE_TYPE_FLOPPY,
|
1995-05-26 10:41:52 +02:00
|
|
|
DEVICE_TYPE_FTP,
|
1995-05-01 23:56:32 +02:00
|
|
|
DEVICE_TYPE_NETWORK,
|
|
|
|
DEVICE_TYPE_CDROM,
|
|
|
|
DEVICE_TYPE_TAPE,
|
1995-05-20 13:10:35 +02:00
|
|
|
DEVICE_TYPE_DOS,
|
1995-05-29 13:01:42 +02:00
|
|
|
DEVICE_TYPE_UFS,
|
|
|
|
DEVICE_TYPE_NFS,
|
1995-05-08 23:39:40 +02:00
|
|
|
DEVICE_TYPE_ANY,
|
1995-05-01 23:56:32 +02:00
|
|
|
} DeviceType;
|
|
|
|
|
|
|
|
/* A "device" from sysinstall's point of view */
|
|
|
|
typedef struct _device {
|
|
|
|
char name[DEV_NAME_MAX];
|
1995-05-16 13:37:27 +02:00
|
|
|
char *description;
|
1995-05-20 02:13:14 +02:00
|
|
|
char *devname;
|
1995-05-01 23:56:32 +02:00
|
|
|
DeviceType type;
|
1995-05-16 04:53:31 +02:00
|
|
|
Boolean enabled;
|
1995-06-11 21:33:05 +02:00
|
|
|
Boolean (*init)(struct _device *dev);
|
|
|
|
int (*get)(struct _device *dev, char *file, Attribs *dist_attrs);
|
|
|
|
Boolean (*close)(struct _device *dev, int fd);
|
|
|
|
void (*shutdown)(struct _device *dev);
|
1995-05-16 13:37:27 +02:00
|
|
|
void *private;
|
1995-06-11 21:33:05 +02:00
|
|
|
unsigned int flags;
|
1995-05-01 23:56:32 +02:00
|
|
|
} Device;
|
|
|
|
|
1995-05-06 11:34:24 +02:00
|
|
|
/* Some internal representations of partitions */
|
|
|
|
typedef enum {
|
|
|
|
PART_NONE,
|
|
|
|
PART_SLICE,
|
|
|
|
PART_SWAP,
|
1995-05-16 04:53:31 +02:00
|
|
|
PART_FILESYSTEM,
|
|
|
|
PART_FAT,
|
1995-05-06 11:34:24 +02:00
|
|
|
} PartType;
|
|
|
|
|
1995-05-08 01:37:34 +02:00
|
|
|
/* The longest newfs command we'll hand to system() */
|
|
|
|
#define NEWFS_CMD_MAX 256
|
|
|
|
|
1995-05-06 11:34:24 +02:00
|
|
|
typedef struct _part_info {
|
|
|
|
Boolean newfs;
|
|
|
|
char mountpoint[FILENAME_MAX];
|
1995-05-08 01:37:34 +02:00
|
|
|
char newfs_cmd[NEWFS_CMD_MAX];
|
1995-05-06 11:34:24 +02:00
|
|
|
} PartInfo;
|
|
|
|
|
1995-05-16 04:53:31 +02:00
|
|
|
typedef int (*commandFunc)(char *key, void *data);
|
|
|
|
|
1995-05-28 11:31:44 +02:00
|
|
|
#define HOSTNAME_FIELD_LEN 256
|
|
|
|
#define IPADDR_FIELD_LEN 16
|
|
|
|
#define EXTRAS_FIELD_LEN 256
|
|
|
|
|
|
|
|
/* This is the structure that Network devices carry around in their private, erm, structures */
|
|
|
|
typedef struct _devPriv {
|
|
|
|
char ipaddr[IPADDR_FIELD_LEN];
|
|
|
|
char netmask[IPADDR_FIELD_LEN];
|
|
|
|
char extras[EXTRAS_FIELD_LEN];
|
|
|
|
} DevInfo;
|
|
|
|
|
1995-05-01 23:56:32 +02:00
|
|
|
|
|
|
|
/*** Externs ***/
|
1995-05-17 16:40:00 +02:00
|
|
|
extern int DebugFD; /* Where diagnostic output goes */
|
1995-05-30 10:29:07 +02:00
|
|
|
extern Boolean SystemWasInstalled; /* Did we install it? */
|
1995-05-25 00:37:44 +02:00
|
|
|
extern Boolean RunningAsInit; /* Are we running stand-alone? */
|
1995-05-17 16:40:00 +02:00
|
|
|
extern Boolean DialogActive; /* Is the dialog() stuff up? */
|
|
|
|
extern Boolean ColorDisplay; /* Are we on a color display? */
|
|
|
|
extern Boolean OnVTY; /* On a syscons VTY? */
|
|
|
|
extern Variable *VarHead; /* The head of the variable chain */
|
1995-05-20 02:13:14 +02:00
|
|
|
extern Device *mediaDevice; /* Where we're getting our distribution from */
|
1995-05-17 16:40:00 +02:00
|
|
|
extern unsigned int Dists; /* Which distributions we want */
|
1995-06-11 21:33:05 +02:00
|
|
|
extern unsigned int DESDists; /* Which naughty distributions we want */
|
1995-05-17 16:40:00 +02:00
|
|
|
extern unsigned int SrcDists; /* Which src distributions we want */
|
|
|
|
extern unsigned int XF86Dists; /* Which XFree86 dists we want */
|
|
|
|
extern unsigned int XF86ServerDists; /* The XFree86 servers we want */
|
|
|
|
extern unsigned int XF86FontDists; /* The XFree86 fonts we want */
|
1995-06-11 21:33:05 +02:00
|
|
|
extern unsigned int OptFlags; /* Global options */
|
|
|
|
extern int BootMgr; /* Which boot manager to use */
|
|
|
|
extern char *InstallPrefix; /* A location bias */
|
|
|
|
|
1995-05-17 16:40:00 +02:00
|
|
|
|
|
|
|
extern DMenu MenuInitial; /* Initial installation menu */
|
1995-05-20 22:30:12 +02:00
|
|
|
extern DMenu MenuMBRType; /* Type of MBR to write on the disk */
|
1995-05-24 03:27:15 +02:00
|
|
|
extern DMenu MenuConfigure; /* Final configuration menu */
|
1995-05-17 16:40:00 +02:00
|
|
|
extern DMenu MenuDocumentation; /* Documentation menu */
|
1995-09-18 18:53:06 +02:00
|
|
|
extern DMenu MenuFTPOptions; /* FTP Installation options */
|
1995-05-17 16:40:00 +02:00
|
|
|
extern DMenu MenuOptions; /* Installation options */
|
|
|
|
extern DMenu MenuOptionsLanguage; /* Language options menu */
|
|
|
|
extern DMenu MenuMedia; /* Media type menu */
|
|
|
|
extern DMenu MenuMediaCDROM; /* CDROM media menu */
|
1995-05-21 17:40:54 +02:00
|
|
|
extern DMenu MenuMediaDOS; /* DOS media menu */
|
1995-05-17 16:40:00 +02:00
|
|
|
extern DMenu MenuMediaFloppy; /* Floppy media menu */
|
|
|
|
extern DMenu MenuMediaFTP; /* FTP media menu */
|
1995-05-21 17:40:54 +02:00
|
|
|
extern DMenu MenuMediaTape; /* Tape media menu */
|
|
|
|
extern DMenu MenuNetworkDevice; /* Network device menu */
|
1995-05-28 11:31:44 +02:00
|
|
|
extern DMenu MenuNTP; /* NTP time server menu */
|
1995-05-24 11:00:58 +02:00
|
|
|
extern DMenu MenuSyscons; /* System console configuration menu */
|
1995-05-28 11:31:44 +02:00
|
|
|
extern DMenu MenuSysconsKeymap; /* System console keymap configuration menu */
|
|
|
|
extern DMenu MenuSysconsKeyrate; /* System console keyrate configuration menu */
|
|
|
|
extern DMenu MenuSysconsSaver; /* System console saver configuration menu */
|
|
|
|
extern DMenu MenuNetworking; /* Network configuration menu */
|
1995-09-18 18:53:06 +02:00
|
|
|
extern DMenu MenuInstallCustom; /* Custom Installation menu */
|
1995-05-17 16:40:00 +02:00
|
|
|
extern DMenu MenuInstallType; /* Installation type menu */
|
|
|
|
extern DMenu MenuDistributions; /* Distribution menu */
|
1995-06-11 21:33:05 +02:00
|
|
|
extern DMenu MenuDESDistributions; /* DES distribution menu */
|
1995-05-17 16:40:00 +02:00
|
|
|
extern DMenu MenuSrcDistributions; /* Source distribution menu */
|
|
|
|
extern DMenu MenuXF86; /* XFree86 main menu */
|
|
|
|
extern DMenu MenuXF86Select; /* XFree86 distribution selection menu */
|
|
|
|
extern DMenu MenuXF86SelectCore; /* XFree86 core distribution menu */
|
|
|
|
extern DMenu MenuXF86SelectServer; /* XFree86 server distribution menu */
|
|
|
|
extern DMenu MenuXF86SelectFonts; /* XFree86 font selection menu */
|
|
|
|
extern DMenu MenuDiskDevices; /* Disk devices menu */
|
|
|
|
|
1995-04-27 14:50:35 +02:00
|
|
|
|
1995-05-01 23:56:32 +02:00
|
|
|
/*** Prototypes ***/
|
1995-04-27 20:03:55 +02:00
|
|
|
|
1995-05-27 12:47:44 +02:00
|
|
|
/* attrs.c */
|
|
|
|
extern const char *attr_match(Attribs *attr, char *name);
|
|
|
|
extern int attr_parse(Attribs **attr, char *file);
|
|
|
|
|
|
|
|
/* cdrom.c */
|
|
|
|
extern Boolean mediaInitCDROM(Device *dev);
|
1995-06-11 21:33:05 +02:00
|
|
|
extern int mediaGetCDROM(Device *dev, char *file, Attribs *dist_attrs);
|
1995-05-27 12:47:44 +02:00
|
|
|
extern void mediaShutdownCDROM(Device *dev);
|
|
|
|
|
1995-05-08 08:06:30 +02:00
|
|
|
/* command.c */
|
|
|
|
extern void command_clear(void);
|
|
|
|
extern void command_sort(void);
|
|
|
|
extern void command_execute(void);
|
1995-05-16 04:53:31 +02:00
|
|
|
extern void command_shell_add(char *key, char *fmt, ...);
|
|
|
|
extern void command_func_add(char *key, commandFunc func, void *data);
|
1995-05-08 08:06:30 +02:00
|
|
|
|
1995-05-23 04:41:18 +02:00
|
|
|
/* config.c */
|
1995-05-24 11:00:58 +02:00
|
|
|
extern void configFstab(void);
|
|
|
|
extern void configSysconfig(void);
|
|
|
|
extern void configResolv(void);
|
|
|
|
extern int configPorts(char *str);
|
|
|
|
extern int configPackages(char *str);
|
|
|
|
extern int configSaverTimeout(char *str);
|
1995-06-11 21:33:05 +02:00
|
|
|
extern int configNTP(char *str);
|
|
|
|
extern int configRoutedFlags(char *str);
|
|
|
|
|
|
|
|
/* crc.c */
|
|
|
|
extern int crc(int, unsigned long *, unsigned long *);
|
1995-05-23 04:41:18 +02:00
|
|
|
|
1995-05-10 09:45:00 +02:00
|
|
|
/* decode.c */
|
|
|
|
extern DMenuItem *decode(DMenu *menu, char *name);
|
|
|
|
extern Boolean dispatch(DMenuItem *tmp, char *name);
|
|
|
|
extern Boolean decode_and_dispatch_multiple(DMenu *menu, char *names);
|
|
|
|
|
1995-05-08 12:20:56 +02:00
|
|
|
/* devices.c */
|
1995-05-16 04:53:31 +02:00
|
|
|
extern DMenu *deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)());
|
1995-05-16 13:37:27 +02:00
|
|
|
extern void deviceGetAll(void);
|
|
|
|
extern Device **deviceFind(char *name, DeviceType type);
|
1995-05-20 02:13:14 +02:00
|
|
|
extern int deviceCount(Device **devs);
|
1995-05-20 12:33:14 +02:00
|
|
|
extern Device *new_device(char *name);
|
|
|
|
extern Device *deviceRegister(char *name, char *desc, char *devname, DeviceType type, Boolean enabled,
|
1995-06-11 21:33:05 +02:00
|
|
|
Boolean (*init)(Device *mediadev), int (*get)(Device *dev, char *file, Attribs *dist_attrs),
|
1995-05-24 11:00:58 +02:00
|
|
|
Boolean (*close)(Device *mediadev, int fd), void (*shutDown)(Device *mediadev),
|
|
|
|
void *private);
|
1995-06-11 21:33:05 +02:00
|
|
|
extern Boolean dummyInit(Device *dev);
|
|
|
|
extern int dummyGet(Device *dev, char *dist, Attribs *dist_attrs);
|
|
|
|
extern Boolean dummyClose(Device *dev, int fd);
|
|
|
|
extern void dummyShutdown(Device *dev);
|
1995-04-27 14:50:35 +02:00
|
|
|
|
1995-05-08 12:20:56 +02:00
|
|
|
/* disks.c */
|
1995-05-16 13:37:27 +02:00
|
|
|
extern int diskPartitionEditor(char *unused);
|
1995-09-18 18:53:06 +02:00
|
|
|
extern int diskPartitionWrite(char *unused);
|
1995-05-04 21:48:19 +02:00
|
|
|
|
|
|
|
/* dist.c */
|
1995-05-25 20:48:33 +02:00
|
|
|
extern int distReset(char *str);
|
1995-05-04 21:48:19 +02:00
|
|
|
extern int distSetDeveloper(char *str);
|
|
|
|
extern int distSetXDeveloper(char *str);
|
1995-06-11 21:33:05 +02:00
|
|
|
extern int distSetKernDeveloper(char *str);
|
1995-05-04 21:48:19 +02:00
|
|
|
extern int distSetUser(char *str);
|
|
|
|
extern int distSetXUser(char *str);
|
|
|
|
extern int distSetMinimum(char *str);
|
|
|
|
extern int distSetEverything(char *str);
|
1995-06-11 21:33:05 +02:00
|
|
|
extern int distSetDES(char *str);
|
1995-05-10 09:45:00 +02:00
|
|
|
extern int distSetSrc(char *str);
|
1995-06-11 21:33:05 +02:00
|
|
|
extern int distSetXF86(char *str);
|
1995-09-18 18:53:06 +02:00
|
|
|
extern int distExtractAll(char *str);
|
1995-04-27 14:50:35 +02:00
|
|
|
|
1995-04-27 20:03:55 +02:00
|
|
|
/* dmenu.c */
|
1995-06-11 21:33:05 +02:00
|
|
|
extern Boolean dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max);
|
|
|
|
extern Boolean dmenuOpenSimple(DMenu *menu);
|
|
|
|
extern char *dmenuVarCheck(DMenuItem *item);
|
|
|
|
extern char *dmenuFlagCheck(DMenuItem *item);
|
|
|
|
extern char *dmenuRadioCheck(DMenuItem *item);
|
1995-04-27 14:50:35 +02:00
|
|
|
|
1995-05-27 12:47:44 +02:00
|
|
|
/* dos.c */
|
|
|
|
extern Boolean mediaInitDOS(Device *dev);
|
1995-06-11 21:33:05 +02:00
|
|
|
extern int mediaGetDOS(Device *dev, char *file, Attribs *dist_attrs);
|
1995-05-27 12:47:44 +02:00
|
|
|
extern void mediaShutdownDOS(Device *dev);
|
|
|
|
|
|
|
|
/* floppy.c */
|
|
|
|
extern int getRootFloppy(void);
|
|
|
|
extern Boolean mediaInitFloppy(Device *dev);
|
1995-06-11 21:33:05 +02:00
|
|
|
extern int mediaGetFloppy(Device *dev, char *file, Attribs *dist_attrs);
|
1995-05-27 12:47:44 +02:00
|
|
|
extern void mediaShutdownFloppy(Device *dev);
|
|
|
|
|
|
|
|
/* ftp_strat.c */
|
|
|
|
extern Boolean mediaCloseFTP(Device *dev, int fd);
|
|
|
|
extern Boolean mediaInitFTP(Device *dev);
|
1995-06-11 21:33:05 +02:00
|
|
|
extern int mediaGetFTP(Device *dev, char *file, Attribs *dist_attrs);
|
1995-05-27 12:47:44 +02:00
|
|
|
extern void mediaShutdownFTP(Device *dev);
|
1995-06-11 21:33:05 +02:00
|
|
|
extern int mediaSetFtpUserPass(char *str);
|
1995-05-27 12:47:44 +02:00
|
|
|
|
1995-05-08 12:20:56 +02:00
|
|
|
/* globals.c */
|
|
|
|
extern void globalsInit(void);
|
|
|
|
|
|
|
|
/* install.c */
|
1995-05-16 13:37:27 +02:00
|
|
|
extern int installCommit(char *str);
|
1995-09-18 18:53:06 +02:00
|
|
|
extern int installExpress(char *str);
|
|
|
|
extern Boolean installFilesystems(void);
|
1995-05-08 12:20:56 +02:00
|
|
|
|
|
|
|
/* lang.c */
|
|
|
|
extern void lang_set_Danish(char *str);
|
|
|
|
extern void lang_set_Dutch(char *str);
|
|
|
|
extern void lang_set_English(char *str);
|
|
|
|
extern void lang_set_French(char *str);
|
|
|
|
extern void lang_set_German(char *str);
|
|
|
|
extern void lang_set_Italian(char *str);
|
|
|
|
extern void lang_set_Japanese(char *str);
|
|
|
|
extern void lang_set_Norwegian(char *str);
|
|
|
|
extern void lang_set_Russian(char *str);
|
|
|
|
extern void lang_set_Spanish(char *str);
|
|
|
|
extern void lang_set_Swedish(char *str);
|
|
|
|
|
1995-05-16 04:53:31 +02:00
|
|
|
/* label.c */
|
1995-05-17 16:40:00 +02:00
|
|
|
extern int diskLabelEditor(char *str);
|
1995-09-18 18:53:06 +02:00
|
|
|
extern int diskLabelCommit(char *str);
|
1995-05-16 04:53:31 +02:00
|
|
|
|
1995-05-08 12:20:56 +02:00
|
|
|
/* makedevs.c (auto-generated) */
|
1995-05-10 09:45:00 +02:00
|
|
|
extern const char termcap_vt100[];
|
|
|
|
extern const char termcap_cons25[];
|
|
|
|
extern const char termcap_cons25_m[];
|
|
|
|
extern const char termcap_cons25r[];
|
|
|
|
extern const char termcap_cons25r_m[];
|
|
|
|
extern const char termcap_cons25l1[];
|
|
|
|
extern const char termcap_cons25l1_m[];
|
1995-05-18 17:29:47 +02:00
|
|
|
extern const u_char font_iso_8x16[];
|
|
|
|
extern const u_char font_cp850_8x16[];
|
1995-05-19 18:58:58 +02:00
|
|
|
extern const u_char font_cp866_8x16[];
|
|
|
|
extern const u_char koi8_r2cp866[];
|
|
|
|
extern u_char default_scrnmap[];
|
1995-05-08 12:20:56 +02:00
|
|
|
|
|
|
|
/* media.c */
|
|
|
|
extern int mediaSetCDROM(char *str);
|
|
|
|
extern int mediaSetFloppy(char *str);
|
|
|
|
extern int mediaSetDOS(char *str);
|
|
|
|
extern int mediaSetTape(char *str);
|
|
|
|
extern int mediaSetFTP(char *str);
|
1995-09-18 18:53:06 +02:00
|
|
|
extern int mediaSetFTPActive(char *str);
|
|
|
|
extern int mediaSetFTPPassive(char *str);
|
1995-05-29 13:01:42 +02:00
|
|
|
extern int mediaSetUFS(char *str);
|
|
|
|
extern int mediaSetNFS(char *str);
|
1995-05-16 13:37:27 +02:00
|
|
|
extern Boolean mediaGetType(void);
|
1995-05-29 13:01:42 +02:00
|
|
|
extern Boolean mediaExtractDist(char *dir, int fd);
|
|
|
|
extern Boolean mediaExtractDistBegin(char *dir, int *fd, int *zpid, int *cpic);
|
1995-05-28 01:39:35 +02:00
|
|
|
extern Boolean mediaExtractDistEnd(int zpid, int cpid);
|
1995-05-16 13:37:27 +02:00
|
|
|
extern Boolean mediaVerify(void);
|
1995-05-17 16:40:00 +02:00
|
|
|
|
1995-04-27 20:03:55 +02:00
|
|
|
/* misc.c */
|
1995-04-27 14:50:35 +02:00
|
|
|
extern Boolean file_readable(char *fname);
|
|
|
|
extern Boolean file_executable(char *fname);
|
|
|
|
extern char *string_concat(char *p1, char *p2);
|
|
|
|
extern char *string_prune(char *str);
|
|
|
|
extern char *string_skipwhite(char *str);
|
|
|
|
extern void safe_free(void *ptr);
|
1995-05-01 23:56:32 +02:00
|
|
|
extern void *safe_malloc(size_t size);
|
1995-05-08 23:39:40 +02:00
|
|
|
extern void *safe_realloc(void *orig, size_t size);
|
1995-04-27 14:50:35 +02:00
|
|
|
extern char **item_add(char **list, char *item, int *curr, int *max);
|
1995-04-29 21:33:06 +02:00
|
|
|
extern char **item_add_pair(char **list, char *item1, char *item2,
|
|
|
|
int *curr, int *max);
|
1995-04-27 14:50:35 +02:00
|
|
|
extern void items_free(char **list, int *curr, int *max);
|
1995-05-16 13:37:27 +02:00
|
|
|
extern int Mkdir(char *, void *data);
|
|
|
|
extern int Mount(char *, void *data);
|
1995-04-27 14:50:35 +02:00
|
|
|
|
1995-04-27 20:03:55 +02:00
|
|
|
/* msg.c */
|
1995-05-29 13:01:42 +02:00
|
|
|
extern Boolean isDebug(void);
|
1995-04-27 14:50:35 +02:00
|
|
|
extern void msgInfo(char *fmt, ...);
|
1995-05-04 05:51:22 +02:00
|
|
|
extern void msgYap(char *fmt, ...);
|
1995-04-27 14:50:35 +02:00
|
|
|
extern void msgWarn(char *fmt, ...);
|
1995-05-08 08:06:30 +02:00
|
|
|
extern void msgDebug(char *fmt, ...);
|
1995-04-27 14:50:35 +02:00
|
|
|
extern void msgError(char *fmt, ...);
|
|
|
|
extern void msgFatal(char *fmt, ...);
|
1995-05-01 23:56:32 +02:00
|
|
|
extern void msgConfirm(char *fmt, ...);
|
1995-05-07 04:04:29 +02:00
|
|
|
extern void msgNotify(char *fmt, ...);
|
1995-05-23 04:41:18 +02:00
|
|
|
extern void msgWeHaveOutput(char *fmt, ...);
|
1995-05-01 23:56:32 +02:00
|
|
|
extern int msgYesNo(char *fmt, ...);
|
1995-05-04 05:51:22 +02:00
|
|
|
extern char *msgGetInput(char *buf, char *fmt, ...);
|
1995-04-27 14:50:35 +02:00
|
|
|
|
1995-05-27 12:47:44 +02:00
|
|
|
/* network.c */
|
|
|
|
extern Boolean mediaInitNetwork(Device *dev);
|
|
|
|
extern void mediaShutdownNetwork(Device *dev);
|
|
|
|
|
1995-05-29 13:01:42 +02:00
|
|
|
/* nfs.c */
|
|
|
|
extern Boolean mediaInitNFS(Device *dev);
|
1995-06-11 21:33:05 +02:00
|
|
|
extern int mediaGetNFS(Device *dev, char *file, Attribs *dist_attrs);
|
1995-05-29 13:01:42 +02:00
|
|
|
extern void mediaShutdownNFS(Device *dev);
|
|
|
|
|
1995-05-08 12:20:56 +02:00
|
|
|
/* system.c */
|
|
|
|
extern void systemInitialize(int argc, char **argv);
|
|
|
|
extern void systemShutdown(void);
|
|
|
|
extern int systemExecute(char *cmd);
|
|
|
|
extern int systemDisplayFile(char *file);
|
|
|
|
extern char *systemHelpFile(char *file, char *buf);
|
|
|
|
extern void systemChangeFont(const u_char font[]);
|
|
|
|
extern void systemChangeLang(char *lang);
|
|
|
|
extern void systemChangeTerminal(char *color, const u_char c_termcap[],
|
|
|
|
char *mono, const u_char m_termcap[]);
|
|
|
|
extern void systemChangeScreenmap(const u_char newmap[]);
|
|
|
|
extern int vsystem(char *fmt, ...);
|
1995-05-01 23:56:32 +02:00
|
|
|
|
1995-05-27 12:47:44 +02:00
|
|
|
/* tape.c */
|
|
|
|
extern Boolean mediaInitTape(Device *dev);
|
1995-06-11 21:33:05 +02:00
|
|
|
extern int mediaGetTape(Device *dev, char *file, Attribs *dist_attrs);
|
1995-05-27 12:47:44 +02:00
|
|
|
extern void mediaShutdownTape(Device *dev);
|
|
|
|
|
1995-05-16 13:37:27 +02:00
|
|
|
/* tcpip.c */
|
1995-05-26 21:28:06 +02:00
|
|
|
extern int tcpOpenDialog(Device *dev);
|
1995-06-11 21:33:05 +02:00
|
|
|
extern int tcpMenuSelect(char *str);
|
|
|
|
extern Boolean tcpDeviceSelect(void);
|
1995-05-16 13:37:27 +02:00
|
|
|
|
1995-05-08 12:20:56 +02:00
|
|
|
/* termcap.c */
|
|
|
|
extern int set_termcap(void);
|
1995-05-01 23:56:32 +02:00
|
|
|
|
1995-05-27 12:47:44 +02:00
|
|
|
/* ufs.c */
|
1995-05-29 13:01:42 +02:00
|
|
|
extern void mediaShutdownUFS(Device *dev);
|
1995-05-27 12:47:44 +02:00
|
|
|
extern Boolean mediaInitUFS(Device *dev);
|
1995-06-11 21:33:05 +02:00
|
|
|
extern int mediaGetUFS(Device *dev, char *file, Attribs *dist_attrs);
|
1995-05-27 12:47:44 +02:00
|
|
|
|
1995-05-01 23:56:32 +02:00
|
|
|
/* variables.c */
|
|
|
|
extern void variable_set(char *var);
|
|
|
|
extern void variable_set2(char *name, char *value);
|
1995-04-27 20:03:55 +02:00
|
|
|
|
1995-05-05 01:36:23 +02:00
|
|
|
/* wizard.c */
|
1995-05-16 04:53:31 +02:00
|
|
|
extern void slice_wizard(Disk *d);
|
1995-05-05 01:36:23 +02:00
|
|
|
|
1995-04-27 14:50:35 +02:00
|
|
|
#endif
|
|
|
|
/* _SYSINSTALL_H_INCLUDE */
|