mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
Libdisk does not need to include <sys/diskslice.h> any more.
Move the remaining bits of <sys/diskslice.h> to <i386/include/bootinfo.h> Move i386/pc98 specific bits from <sys/reboot.h> to <i386/include/bootinfo.h> as well. Adjust includes in sys/boot accordingly.
This commit is contained in:
parent
e0926f607f
commit
197e5e73ef
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113083
@ -19,7 +19,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <stdarg.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/disklabel.h>
|
||||
#include <sys/diskslice.h>
|
||||
#ifdef PC98
|
||||
#include <sys/diskpc98.h>
|
||||
#else
|
||||
|
@ -23,7 +23,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/disklabel.h>
|
||||
#include <sys/diskslice.h>
|
||||
#include <sys/uuid.h>
|
||||
#include <sys/gpt.h>
|
||||
#include <paths.h>
|
||||
|
@ -15,7 +15,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/diskslice.h>
|
||||
#include <sys/disklabel.h>
|
||||
#ifdef PC98
|
||||
#include <sys/diskpc98.h>
|
||||
|
@ -19,7 +19,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/disklabel.h>
|
||||
#include <sys/diskslice.h>
|
||||
#include <paths.h>
|
||||
#include "libdisk.h"
|
||||
|
||||
|
@ -18,7 +18,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/disklabel.h>
|
||||
#include <sys/diskslice.h>
|
||||
#include <sys/diskmbr.h>
|
||||
#include <paths.h>
|
||||
#include "libdisk.h"
|
||||
|
@ -19,7 +19,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/disklabel.h>
|
||||
#include <sys/diskslice.h>
|
||||
#include <paths.h>
|
||||
#include "libdisk.h"
|
||||
|
||||
|
@ -18,7 +18,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/disklabel.h>
|
||||
#include <sys/diskslice.h>
|
||||
#include <sys/diskmbr.h>
|
||||
#include <paths.h>
|
||||
#include "libdisk.h"
|
||||
|
@ -18,7 +18,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/disklabel.h>
|
||||
#include <sys/diskslice.h>
|
||||
#include <sys/diskmbr.h>
|
||||
#include <paths.h>
|
||||
#include "libdisk.h"
|
||||
|
@ -20,7 +20,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/disklabel.h>
|
||||
#include <sys/diskslice.h>
|
||||
#include <sys/diskpc98.h>
|
||||
#include <paths.h>
|
||||
#include "libdisk.h"
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include <stand.h>
|
||||
#include <string.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/linker.h>
|
||||
#include <machine/elf.h>
|
||||
#include <machine/prom.h>
|
||||
|
@ -40,7 +40,6 @@
|
||||
#include <stand.h>
|
||||
|
||||
#include <sys/disklabel.h>
|
||||
#include <sys/diskslice.h>
|
||||
|
||||
#include <machine/stdarg.h>
|
||||
#include <machine/prom.h>
|
||||
|
@ -40,7 +40,6 @@
|
||||
#include <stand.h>
|
||||
|
||||
#include <sys/disklabel.h>
|
||||
#include <sys/diskslice.h>
|
||||
|
||||
#include <machine/stdarg.h>
|
||||
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include <stand.h>
|
||||
#include <string.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/linker.h>
|
||||
#include <machine/elf.h>
|
||||
#include <machine/prom.h>
|
||||
|
@ -28,7 +28,6 @@
|
||||
|
||||
#include <stand.h>
|
||||
#include <string.h>
|
||||
#include <sys/reboot.h>
|
||||
|
||||
#include "bootstrap.h"
|
||||
|
||||
|
@ -29,7 +29,6 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/linker.h>
|
||||
#include <sys/module.h>
|
||||
#include <string.h>
|
||||
|
@ -18,8 +18,6 @@
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/diskslice.h>
|
||||
#include <sys/disklabel.h>
|
||||
#include <sys/diskmbr.h>
|
||||
#include <sys/dirent.h>
|
||||
|
@ -18,8 +18,6 @@
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/diskslice.h>
|
||||
#include <sys/disklabel.h>
|
||||
#include <sys/diskmbr.h>
|
||||
#include <sys/dirent.h>
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include <stand.h>
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <machine/bootinfo.h>
|
||||
#include <machine/psl.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
#include <sys/disklabel.h>
|
||||
#include <sys/diskmbr.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <machine/bootinfo.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
|
@ -28,7 +28,6 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/linker.h>
|
||||
#include <string.h>
|
||||
#include <machine/bootinfo.h>
|
||||
|
@ -28,7 +28,6 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/linker.h>
|
||||
#include <string.h>
|
||||
#include <machine/bootinfo.h>
|
||||
|
@ -28,7 +28,6 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/linker.h>
|
||||
#include <string.h>
|
||||
#include <machine/bootinfo.h>
|
||||
|
@ -43,8 +43,8 @@
|
||||
|
||||
#include "boot.h"
|
||||
#include <sys/disklabel.h>
|
||||
#include <sys/diskslice.h>
|
||||
#include <sys/diskpc98.h>
|
||||
#include <machine/bootinfo.h>
|
||||
|
||||
#define BIOS_DEV_FLOPPY 0x0
|
||||
#define BIOS_DEV_WIN 0x80
|
||||
|
@ -33,7 +33,6 @@
|
||||
|
||||
#include "boot.h"
|
||||
#include <sys/dirent.h>
|
||||
#include <sys/reboot.h>
|
||||
|
||||
#if 0
|
||||
/* #define BUFSIZE 4096 */
|
||||
|
@ -39,9 +39,8 @@
|
||||
#include <stand.h>
|
||||
|
||||
#include <sys/disklabel.h>
|
||||
#include <sys/diskslice.h>
|
||||
#include <sys/diskpc98.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <machine/bootinfo.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
|
@ -20,8 +20,6 @@
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/diskslice.h>
|
||||
#include <sys/disklabel.h>
|
||||
#include <sys/dirent.h>
|
||||
#include <machine/elf.h>
|
||||
|
@ -71,4 +71,48 @@ struct bootinfo {
|
||||
extern struct bootinfo bootinfo;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Constants for converting boot-style device number to type,
|
||||
* adaptor (uba, mba, etc), unit number and partition number.
|
||||
* Type (== major device number) is in the low byte
|
||||
* for backward compatibility. Except for that of the "magic
|
||||
* number", each mask applies to the shifted value.
|
||||
* Format:
|
||||
* (4) (4) (4) (4) (8) (8)
|
||||
* --------------------------------
|
||||
* |MA | AD| CT| UN| PART | TYPE |
|
||||
* --------------------------------
|
||||
*/
|
||||
#define B_ADAPTORSHIFT 24
|
||||
#define B_ADAPTORMASK 0x0f
|
||||
#define B_ADAPTOR(val) (((val) >> B_ADAPTORSHIFT) & B_ADAPTORMASK)
|
||||
#define B_CONTROLLERSHIFT 20
|
||||
#define B_CONTROLLERMASK 0xf
|
||||
#define B_CONTROLLER(val) (((val)>>B_CONTROLLERSHIFT) & B_CONTROLLERMASK)
|
||||
#define B_SLICESHIFT 20
|
||||
#define B_SLICEMASK 0xff
|
||||
#define B_SLICE(val) (((val)>>B_SLICESHIFT) & B_SLICEMASK)
|
||||
#define B_UNITSHIFT 16
|
||||
#define B_UNITMASK 0xf
|
||||
#define B_UNIT(val) (((val) >> B_UNITSHIFT) & B_UNITMASK)
|
||||
#define B_PARTITIONSHIFT 8
|
||||
#define B_PARTITIONMASK 0xff
|
||||
#define B_PARTITION(val) (((val) >> B_PARTITIONSHIFT) & B_PARTITIONMASK)
|
||||
#define B_TYPESHIFT 0
|
||||
#define B_TYPEMASK 0xff
|
||||
#define B_TYPE(val) (((val) >> B_TYPESHIFT) & B_TYPEMASK)
|
||||
|
||||
#define B_MAGICMASK 0xf0000000
|
||||
#define B_DEVMAGIC 0xa0000000
|
||||
|
||||
#define MAKEBOOTDEV(type, adaptor, controller, unit, partition) \
|
||||
(((type) << B_TYPESHIFT) | ((adaptor) << B_ADAPTORSHIFT) | \
|
||||
((controller) << B_CONTROLLERSHIFT) | ((unit) << B_UNITSHIFT) | \
|
||||
((partition) << B_PARTITIONSHIFT) | B_DEVMAGIC)
|
||||
|
||||
#define BASE_SLICE 2
|
||||
#define COMPATIBILITY_SLICE 0
|
||||
#define MAX_SLICES 32
|
||||
#define WHOLE_DISK_SLICE 1
|
||||
|
||||
#endif /* !_MACHINE_BOOTINFO_H_ */
|
||||
|
@ -30,10 +30,6 @@
|
||||
#define _SYS_DISKSLICE_H_
|
||||
|
||||
#ifndef sys_boot_code_has_been_fixed
|
||||
#define BASE_SLICE 2
|
||||
#define COMPATIBILITY_SLICE 0
|
||||
#define MAX_SLICES 32
|
||||
#define WHOLE_DISK_SLICE 1
|
||||
#endif
|
||||
|
||||
#endif /* !_SYS_DISKSLICE_H_ */
|
||||
|
@ -66,43 +66,5 @@
|
||||
|
||||
#define RB_BOOTINFO 0x80000000 /* have `struct bootinfo *' arg */
|
||||
|
||||
/*
|
||||
* Constants for converting boot-style device number to type,
|
||||
* adaptor (uba, mba, etc), unit number and partition number.
|
||||
* Type (== major device number) is in the low byte
|
||||
* for backward compatibility. Except for that of the "magic
|
||||
* number", each mask applies to the shifted value.
|
||||
* Format:
|
||||
* (4) (4) (4) (4) (8) (8)
|
||||
* --------------------------------
|
||||
* |MA | AD| CT| UN| PART | TYPE |
|
||||
* --------------------------------
|
||||
*/
|
||||
#define B_ADAPTORSHIFT 24
|
||||
#define B_ADAPTORMASK 0x0f
|
||||
#define B_ADAPTOR(val) (((val) >> B_ADAPTORSHIFT) & B_ADAPTORMASK)
|
||||
#define B_CONTROLLERSHIFT 20
|
||||
#define B_CONTROLLERMASK 0xf
|
||||
#define B_CONTROLLER(val) (((val)>>B_CONTROLLERSHIFT) & B_CONTROLLERMASK)
|
||||
#define B_SLICESHIFT 20
|
||||
#define B_SLICEMASK 0xff
|
||||
#define B_SLICE(val) (((val)>>B_SLICESHIFT) & B_SLICEMASK)
|
||||
#define B_UNITSHIFT 16
|
||||
#define B_UNITMASK 0xf
|
||||
#define B_UNIT(val) (((val) >> B_UNITSHIFT) & B_UNITMASK)
|
||||
#define B_PARTITIONSHIFT 8
|
||||
#define B_PARTITIONMASK 0xff
|
||||
#define B_PARTITION(val) (((val) >> B_PARTITIONSHIFT) & B_PARTITIONMASK)
|
||||
#define B_TYPESHIFT 0
|
||||
#define B_TYPEMASK 0xff
|
||||
#define B_TYPE(val) (((val) >> B_TYPESHIFT) & B_TYPEMASK)
|
||||
|
||||
#define B_MAGICMASK 0xf0000000
|
||||
#define B_DEVMAGIC 0xa0000000
|
||||
|
||||
#define MAKEBOOTDEV(type, adaptor, controller, unit, partition) \
|
||||
(((type) << B_TYPESHIFT) | ((adaptor) << B_ADAPTORSHIFT) | \
|
||||
((controller) << B_CONTROLLERSHIFT) | ((unit) << B_UNITSHIFT) | \
|
||||
((partition) << B_PARTITIONSHIFT) | B_DEVMAGIC)
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user