Index: sys/boot/i386/boot2/boot2.c =================================================================== --- sys/boot/i386/boot2/boot2.c (wersja 218929) +++ sys/boot/i386/boot2/boot2.c (kopia robocza) @@ -81,7 +81,7 @@ #define ARGS 0x900 #define NOPT 14 -#define NDEV 3 +#define NDEV 2 #define MEM_BASE 0x12 #define MEM_EXT 0x15 #define V86_CY(x) ((x) & PSL_C) @@ -92,8 +92,6 @@ #define TYPE_AD 0 #define TYPE_DA 1 -#define TYPE_MAXHARD TYPE_DA -#define TYPE_FD 2 #define OPT_SET(opt) (1 << (opt)) #define OPT_CHECK(opt) ((opts) & OPT_SET(opt)) @@ -118,8 +116,8 @@ RBX_VERBOSE }; -static const char *const dev_nm[NDEV] = {"ad", "da", "fd"}; -static const unsigned char dev_maj[NDEV] = {30, 4, 2}; +static const char *const dev_nm[NDEV] = {"ad", "da"}; +static const unsigned char dev_maj[NDEV] = {30, 4}; static struct dsk { unsigned drive; @@ -172,7 +170,7 @@ #define UFS_SMALL_CGBASE #include "ufsread.c" -static inline int +static int xfsread(ino_t inode, void *buf, size_t nbyte) { if ((size_t)fsread(inode, buf, nbyte) != nbyte) { @@ -240,7 +238,7 @@ v86.ctl = V86_FLAGS; v86.efl = PSL_RESERVED_DEFAULT | PSL_I; dsk.drive = *(uint8_t *)PTOV(ARGS); - dsk.type = dsk.drive & DRV_HARD ? TYPE_AD : TYPE_FD; + dsk.type = TYPE_AD; dsk.unit = dsk.drive & DRV_MASK; dsk.slice = *(uint8_t *)PTOV(ARGS + 1) + 1; bootinfo.bi_version = BOOTINFO_VERSION; @@ -319,7 +317,7 @@ static Elf32_Shdr es[2]; caddr_t p; ino_t ino; - uint32_t addr, x; + uint32_t addr; int i, j; uint8_t fmt; @@ -470,8 +468,7 @@ arg += 2; if (drv == -1) drv = dsk.unit; - dsk.drive = (dsk.type <= TYPE_MAXHARD - ? DRV_HARD : 0) + drv; + dsk.drive = DRV_HARD + drv; dsk_meta = 0; } if ((i = ep - arg)) {