diff options
| author | Paul Richards <paul@FreeBSD.org> | 1994-10-18 07:56:34 +0000 |
|---|---|---|
| committer | Paul Richards <paul@FreeBSD.org> | 1994-10-18 07:56:34 +0000 |
| commit | 2ca2c11464006888dc64cac806834fa4e4445df6 (patch) | |
| tree | 114e9b183fa0d7a69513c0a3f566bd56cbe1b190 /sbin/sysinstall/bootarea.h | |
| parent | 68ce2055527880a2a60df4127d1ac57b2f149f7c (diff) | |
Notes
Diffstat (limited to 'sbin/sysinstall/bootarea.h')
| -rw-r--r-- | sbin/sysinstall/bootarea.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/sbin/sysinstall/bootarea.h b/sbin/sysinstall/bootarea.h new file mode 100644 index 000000000000..6b9414f4cbae --- /dev/null +++ b/sbin/sysinstall/bootarea.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 1994, Paul Richards. + * + * All rights reserved. + * + * This software may be used, modified, copied, distributed, and + * sold, in both source and binary form provided that the above + * copyright and these terms are retained, verbatim, as the first + * lines of this file. Under no circumstances is the author + * responsible for the proper functioning of this software, nor does + * the author assume any responsibility for damages incurred with + * its use. + */ + +#define BOOT_MAGIC 0xAA55 +#define ACTIVE 0x80 +#define BOOT1 "/usr/mdec/sdboot" +#define BOOT2 "/usr/mdec/bootsd" + +/* XXX -- calculate these, this is nasty */ +#define DEFFSIZE 1024 +#define DEFFRAG 8 + +extern char *part_type(int); +extern int disk_size(int); +extern int enable_label(int); +extern int disable_label(int); +extern int write_bootblocks(int, off_t, int); +extern int build_bootblocks(struct disklabel *); +extern void build_disklabel(struct disklabel *, int, int); +extern int write_bootarea(int); +extern int read_bootarea(int); + +struct bootarea +{ + unsigned char padding[2]; /* force longs to be long aligned */ + unsigned char bootcode[DOSPARTOFF]; + struct dos_partition dospart[4]; + unsigned short signature; +}; + +struct part_type +{ + unsigned char type; + char *name; +}; |
