#include <stddef.h>#include <sys/types.h>#include <sys/stat.h>#include <stdlib.h>#include <stdio.h>#include <limits.h>#include <string.h>#include <errno.h>#include <ibm/partition.h>#include <minix/config.h>#include <minix/type.h>#include <minix/com.h>#include <minix/dmap.h>#include <minix/const.h>#include <minix/minlib.h>#include <minix/syslib.h>#include <kernel/const.h>#include <kernel/type.h>#include "rawfs.h"#include "boot.h"Include dependency graph for boot.c:

Go to the source code of this file.
Data Structures | |
| struct | token |
| struct | biosdev |
Defines | |
| #define | BIOS (!UNIX) |
| #define | nil 0 |
| #define | _POSIX_SOURCE 1 |
| #define | _MINIX 1 |
| #define | EXTERN |
| #define | arraysize(a) (sizeof(a) / sizeof((a)[0])) |
| #define | arraylimit(a) ((a) + arraysize(a)) |
| #define | between(a, c, z) ((unsigned) ((c) - (a)) <= ((z) - (a))) |
| #define | istty (1) |
| #define | alarm(n) (0) |
| #define | null (resnames[0]) |
| #define | b_getenv(name) (*searchenv(name)) |
| #define | DEV_FD0 0x0200 |
| #define | minor_p0s0 128 |
| #define | apm_perror(label, ax) ((void)0) |
| #define | apm_printf |
| #define | B_NOSIG -1 |
Enumerations | |
| enum | resnames { R_NULL, R_BOOT, R_CTTY, R_DELAY, R_ECHO, R_EXIT, R_HELP, R_LS, R_MENU, R_OFF, R_SAVE, R_SET, R_TRAP, R_UNSET } |
| enum | whatfun { NOFUN, SELECT, DEFFUN, USERFUN } |
Functions | |
| char * | bios_err (int err) |
| char * | unix_err (int err) |
| void | rwerr (char *rw, off_t sec, int err) |
| void | readerr (off_t sec, int err) |
| void | writerr (off_t sec, int err) |
| void | readblock (off_t blk, char *buf, int block_size) |
| char * | readline (void) |
| int | sugar (char *tok) |
| char * | onetoken (char **aline) |
| token ** | tokenize (token **acmds, char *line) |
| char * | poptoken (void) |
| void | voidtoken (void) |
| void | parse_code (char *code) |
| int | interrupt (void) |
| int | get_master (char *master, struct part_entry **table, u32_t pos) |
| void | initialize (void) |
| int | reserved (char *s) |
| void | sfree (char *s) |
| char * | copystr (char *s) |
| int | is_default (environment *e) |
| environment ** | searchenv (char *name) |
| char * | b_value (char *name) |
| char * | b_body (char *name) |
| int | b_setenv (int flags, char *name, char *arg, char *value) |
| int | b_setvar (int flags, char *name, char *value) |
| void | b_unset (char *name) |
| long | a2l (char *a) |
| char * | ul2a (u32_t n, unsigned b) |
| char * | ul2a10 (u32_t n) |
| unsigned | a2x (char *a) |
| void | get_parameters (void) |
| void | addparm (char *n) |
| void | save_parameters (void) |
| void | show_env (void) |
| int | numprefix (char *s, char **ps) |
| int | numeric (char *s) |
| dev_t | name2dev (char *name) |
| static void | off (void) |
| int | exec_bootstrap (void) |
| void | boot_device (char *devname) |
| void | ctty (char *line) |
| void | ls (char *dir) |
| u32_t | milli_time (void) |
| u32_t | milli_since (u32_t base) |
| void | unschedule (void) |
| void | schedule (long msec, char *cmd) |
| int | expired (void) |
| void | delay (char *msec) |
| if (e->arg![1]=',') | |
| void | help (void) |
| void | execute (void) |
| int | run_trailer (void) |
| void | monitor (void) |
| void | bootcdinfo (u32_t, int *, int drive) |
| void | boot (void) |
Variables | |
| char | version [] = "2.20" |
| int | fsok = -1 |
| static int | block_size |
| unsigned char | boot_spec [24] |
| token * | cmds |
| int | err |
| int | activate |
| biosdev | bootdev |
| biosdev | tmpdev |
| char | resnames [][6] |
| char * | addptr |
| static dev_t | dev_cNd0 [] = { 0x0300, 0x0800, 0x0A00, 0x0C00, 0x1000 } |
| static int | block_size |
| char * | Thandler |
| u32_t | Tbase |
| u32_t | Tcount |
| enum whatfun | arg [0] |
| unsigned char | cdspec [25] |
|
|
Definition at line 11 of file boot.c. Referenced by res_send(). |
|
|
|
|
|
Definition at line 153 of file boot.c. Referenced by asyn_wait(), DataConnect(), delay(), doPASV(), get_time(), getline(), getreply(), handler(), lin_search(), main(), NetListen(), Proc0(), rcmd(), readline(), schedule(), sendreply(), sig_done(), sleep(), startup(), test20d(), test25c(), test26b(), test26c(), test30a(), test31a(), test32b(), test32c(), test33a(), test33b(), test34c(), test35c(), test37j(), test38a(), test38b(), test5d(), test8a(), test8b(), time_out(), Timed_Get_Char(), ttyread(), and unschedule(). |
|
|
Definition at line 1180 of file boot.c. Referenced by off(). |
|
|
Definition at line 1181 of file boot.c. Referenced by off(). |
|
|
Definition at line 46 of file boot.c. Referenced by ack_emit_init(), apply_add(), bios_err(), closedev(), configtag(), dhcp_settag(), distribute(), forget(), get_parameters(), getgrent(), gethostent(), getline(), gnu_emit_init(), help(), link_islink(), m_help(), main(), ncc_emit_init(), opendev(), printdhcp(), query_chaos(), query_hosts(), round_sysind(), scan_quoted(), searchmanpath(), searchwhatis(), tagdefbyname(), typ2txt(), and ul2a(). |
|
|
Definition at line 45 of file boot.c. Referenced by bas_get_operand(), classname(), dhcp_gettag(), dhcpopname(), dhcptypename(), dns_tell(), getattributes(), ihash(), isregister(), linked(), print_qrr(), query_chaos(), query_hosts(), search_mnem(), trymandir(), and trysubmandir(). |
|
|
|
|
|
Definition at line 1297 of file boot.c. Referenced by boot_device(), and exec_bootstrap(). |
|
|
Definition at line 47 of file boot.c. Referenced by a2l(), a2x(), ascii2octet(), configtag(), ctty(), get_string(), install_master(), isidentchar(), isspace(), isvar(), main(), makedhcp(), name2dev(), numprefix(), parse(), pretty_image(), rijndael_makekey(), servdhcp(), string2long(), and trysubmandir(). |
|
|
|
|
|
Definition at line 1025 of file boot.c. Referenced by main(), name2dev(), and newdevice(). |
|
|
Definition at line 42 of file boot.c. Referenced by ctags(), lex_gettoken(), and maketag(). |
|
|
Definition at line 152 of file boot.c. Referenced by df(), main(), monitor(), show_env(), and writable(). |
|
|
Definition at line 1027 of file boot.c. Referenced by name2dev(). |
|
|
|
Definition at line 651 of file boot.c. Referenced by DotZLib::Inflater::Add(), DotZLib::Deflater::Add(), b_setvar(), b_unset(), cnull(), copystr(), dodefine(), dodefn(), dopushdef(), eval(), extra(), freent(), initkwds(), lookup(), main(), DotZLib::CodecBase::OnDataAvailable(), DotZLib::GZipStream::Read(), sfree(), and DotZLib::GZipStream::Write(). |
|
|
|
|
|
|
|
|
Definition at line 791 of file boot.c. Referenced by delay(), exec_image(), name2dev(), and select_image(). |
|
|
Definition at line 821 of file boot.c. References between. |
|
|
Definition at line 923 of file boot.c. Referenced by save_parameters(). |
|
|
Definition at line 708 of file boot.c. References b_getenv, e, E_FUNCTION, and nil. |
|
||||||||||||||||||||
|
Definition at line 716 of file boot.c. References copystr(), e, E_FUNCTION, E_RESERVED, E_SPECIAL, E_STICKY, is_default(), malloc(), nil, reserved(), searchenv(), and sfree(). Referenced by b_setvar(), and execute(). |
|
||||||||||||||||
|
Definition at line 753 of file boot.c. References b_setenv(), and null. Referenced by execute(), and get_parameters(). |
|
|
Definition at line 765 of file boot.c. References e, E_SPECIAL, free, nil, null, searchenv(), and sfree(). Referenced by execute(). |
|
|
Definition at line 700 of file boot.c. References b_getenv, e, E_VAR, and nil. Referenced by bootminix(), exec_image(), and selected(). |
|
|
Definition at line 61 of file boot.c. References arraylimit. Referenced by boot_device(), and rwerr(). |
|
|
Definition at line 1856 of file boot.c. References boot, cmds, execute(), get_parameters(), initialize(), monitor(), and nil. |
|
|
Definition at line 1344 of file boot.c. References B_NOSIG, bios_err(), dev, dev_open(), biosdev::device, err, exec_bootstrap(), name2dev(), printf, and tmpdev. |
|
||||||||||||||||
|
|
|
|
Definition at line 670 of file boot.c. References malloc(), null, strcpy(), and strlen(). Referenced by ack_get_instruction(), ack_get_operand(), b_setenv(), bas_get_instruction(), bas_get_operand(), collect(), get_prog(), getattributes(), gnu_get_instruction(), gnu_get_operand(), linked(), and traverse(). |
|
|
|
|
|
Definition at line 1459 of file boot.c. References a2l(), alarm, base, count, expired(), interrupt, milli_since(), milli_time(), and pause. Referenced by tputs(). |
|
|
Definition at line 1299 of file boot.c. References activate, active, ACTIVE_FLAG, B_NOSIG, part_entry::bootind, BOOTPOS, bootstrap, dirty, dummy, get_master(), get_word(), if(), master(), mon2abs(), NO_PART, biosdev::primary, readsectors(), biosdev::secondary, SIGNATOFF, SIGNATURE, table, tmpdev, and writesectors(). Referenced by boot_device(). |
|
|
Definition at line 1577 of file boot.c. Referenced by argmatch(), Arith(), arrayelm(), Assign(), boot(), Call(), Cat(), check(), Cond(), Do(), doexec(), exec_one(), execute(), Field(), For(), Forin(), format(), Getline(), If(), In(), Jump(), keyword(), load_code(), main(), Mathfun(), onecommand(), P1stat(), P2stat(), Print(), removedir(), Return(), run(), run_code(), run_trailer(), Split(), startup(), Strfun(), Subst(), transform(), Usrfun(), and While(). |
|
|
Definition at line 1453 of file boot.c. References milli_since(), and nil. Referenced by delay(), execute(), and proc_ind(). |
|
||||||||||||||||
|
Definition at line 459 of file boot.c. References lowsec, mon2abs(), NO_PART, NR_PARTITIONS, PART_TABLE_OFF, readsectors(), part_entry::sysind, and table. Referenced by exec_bootstrap(), and initialize(). |
|
|
Definition at line 842 of file boot.c. References arraylimit, b_setvar(), E_DEV, E_SPECIAL, E_VAR, get_bus(), get_video(), mem, mp, params, strcat(), ul2a(), and ul2a10(). Referenced by boot(). |
|
|
Definition at line 1536 of file boot.c. References arraylimit, info, nil, and printf. |
|
|
|
Definition at line 485 of file boot.c. Referenced by _new(), boot(), main(), mpartition(), sys_task(), and VI(). |
|
|
|
|
|
Definition at line 681 of file boot.c. References e, E_SPECIAL, and nil. Referenced by b_setenv(), save_parameters(), and show_env(). |
|
|
Definition at line 1396 of file boot.c. References errno, fsok, printf, r_lookup(), r_readdir(), r_stat(), r_super(), ROOT_INO, st, and unix_err(). |
|
|
Definition at line 1423 of file boot.c. References milli_time(), and MSEC_PER_TICK. |
|
|
Definition at line 1418 of file boot.c. References get_tick(), and MSEC_PER_TICK. Referenced by delay(), milli_since(), and schedule(). |
|
|
Definition at line 1836 of file boot.c. References bootdev, cmds, err, escape(), free, istty, biosdev::name, printf, readline(), tokenize(), and unschedule(). Referenced by boot(), main(), and shutdown(). |
|
|
Definition at line 1031 of file boot.c. References a2l(), activate, between, bootdev, dev, DEV_BOOT, DEV_FD0, DEV_RAM, biosdev::device, drive, errno, minor_p0s0, biosdev::name, numeric(), numprefix(), biosdev::primary, printf, s, biosdev::secondary, st, strcmp, strncmp(), and tmpdev. Referenced by boot_device(), and params2params(). |
|
|
Definition at line 1017 of file boot.c. References nil, and numprefix(). Referenced by name2dev(), and select_image(). |
|
||||||||||||
|
Definition at line 1000 of file boot.c. Referenced by name2dev(), numeric(), and select_image(). |
|
|
Definition at line 1184 of file boot.c. References apm_perror, apm_printf, bios_env::ax, bios_env::bx, bios_env::cx, FL_CARRY, bios_env::flags, and int15(). |
|
|
Definition at line 340 of file boot.c. References malloc(), memcpy(), nil, and sugar(). Referenced by tokenize(). |
|
|
Definition at line 430 of file boot.c. References cmds, nil, token::token, and tokenize(). Referenced by execute(). |
|
|
Definition at line 412 of file boot.c. References cmd, cmds, free, and token::tok. Referenced by execute(), and voidtoken(). |
|
||||||||||||||||
|
Definition at line 136 of file boot.c. Referenced by getblock(), install_master(), r_readdir(), r_stat(), and r_super(). |
|
||||||||||||
|
Definition at line 133 of file boot.c. References rwerr(). Referenced by get_sector(), initialize(), and readblock(). |
|
|
Definition at line 297 of file boot.c. Referenced by ackbibi(), chartest(), comm(), cpycol(), do_search(), do_visit(), do_writefile(), DOappe(), DOcd(), DOdelete(), DOhelp(), DOlcd(), DOlmkdir(), DOlrmdir(), DOmdtm(), DOmkdir(), DOMretr(), DOMstor(), DOopen(), DOpass(), DOretr(), DOrmdir(), DOrretr(), DOrstor(), DOsize(), DOstat(), DOstor(), DOstou(), DOuser(), getnak(), main(), monitor(), noxrd7(), preadbuffer(), shell(), wcgetsec(), wcrxpn(), wctx(), zdlread(), zgethdr(), zsendfdata(), and zsendfile(). |
|
|
Definition at line 653 of file boot.c. References R_BOOT, and strcmp. Referenced by b_setenv(), execute(), and rl_check_ints(). |
|
|
Definition at line 1822 of file boot.c. References cmds, err, execute(), nil, and tokenize(). |
|
||||||||||||||||
|
Definition at line 127 of file boot.c. References bios_err(), and printf. |
|
|
Definition at line 928 of file boot.c. References addparm(), e, E_DEV, E_FUNCTION, E_RESERVED, E_SPECIAL, is_default(), memset(), nil, params, and printf. |
|
||||||||||||
|
Definition at line 1443 of file boot.c. References alarm, milli_time(), and unschedule(). Referenced by main(). |
|
|
Definition at line 686 of file boot.c. References environment::next, nil, and strcmp. Referenced by b_setenv(), and b_unset(). |
|
|
Definition at line 664 of file boot.c. References free, nil, and null. Referenced by a_free(), b_setenv(), b_unset(), c_free(), Call(), close1(), Delete(), fixarray(), getpat(), getsval(), getvar(), mkfld(), r_mkfld(), setfval(), setsval(), Split(), and Sub(). |
|
|
Definition at line 969 of file boot.c. References e, E_FUNCTION, E_RESERVED, if(), is_default(), istty, nil, and printf. |
|
|
Definition at line 334 of file boot.c. Referenced by execute(), and onetoken(). |
|
||||||||||||
|
Definition at line 388 of file boot.c. References malloc(), newcmd(), token::next, nil, onetoken(), and token::tok. Referenced by monitor(), parse_code(), and run_trailer(). |
|
||||||||||||
|
Definition at line 804 of file boot.c. References a, arraylimit, CHAR_BIT, int(), and num(). Referenced by get_parameters(), and ul2a10(). |
|
|
Definition at line 815 of file boot.c. References ul2a(). Referenced by get_parameters(), and params2params(). |
|
|
Definition at line 117 of file boot.c. References ENOENT, and ENOTDIR. Referenced by ls(), and select_image(). |
|
|
Definition at line 1432 of file boot.c. References alarm, free, and nil. Referenced by execute(), monitor(), and schedule(). |
|
|
Definition at line 424 of file boot.c. References free, and poptoken(). Referenced by execute(). |
|
||||||||||||
|
Definition at line 134 of file boot.c. References rwerr(). Referenced by f_pshinf(), and t_fatal(). |
|
|
Definition at line 452 of file boot.c. Referenced by exec_bootstrap(), mpartition(), and name2dev(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Referenced by initialize(), monitor(), and name2dev(). |
|
|
|
|
|
Definition at line 409 of file boot.c. Referenced by boot(), cmdcomp(), execute(), main(), monitor(), parse_code(), poptoken(), and run_trailer(). |
|
|
|
|
|
|
|
|
Definition at line 49 of file boot.c. Referenced by ls(), and select_image(). |
|
|
Initial value: {
"", "boot", "ctty", "delay", "echo", "exit", "help",
"ls", "menu", "off", "save", "set", "trap", "unset",
}
|
|
|
|
|
|
|
|
|
|
|
|
Referenced by boot_device(), exec_bootstrap(), and name2dev(). |
|
|
Definition at line 5 of file boot.c. Referenced by check_mtab(), execute(), init_config(), list(), main(), query_chaos(), read_super(), readmtab(), select_image(), show(), unzRepair(), update_mtab(), and usage(). |
1.4.6