zfsboot.c (edb26097cb6416adb89b54c830d36c0ead3ca64c) | zfsboot.c (17276525fa1a28028f7ca423f365d5081cbe9a97) |
---|---|
1/*- 2 * Copyright (c) 1998 Robert Nordier 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms are freely 6 * permitted provided that the above copyright notice and this 7 * paragraph and the following disclaimer are duplicated in all 8 * such forms. --- 154 unchanged lines hidden (view full) --- 163 164int main(void); 165 166int 167main(void) 168{ 169 unsigned i; 170 int auto_boot, fd, nextboot = 0; | 1/*- 2 * Copyright (c) 1998 Robert Nordier 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms are freely 6 * permitted provided that the above copyright notice and this 7 * paragraph and the following disclaimer are duplicated in all 8 * such forms. --- 154 unchanged lines hidden (view full) --- 163 164int main(void); 165 166int 167main(void) 168{ 169 unsigned i; 170 int auto_boot, fd, nextboot = 0; |
171 struct disk_devdesc devdesc; | 171 struct disk_devdesc *devdesc; |
172 173 bios_getmem(); 174 175 if (high_heap_size > 0) { 176 heap_top = PTOV(high_heap_base + high_heap_size); 177 heap_bottom = PTOV(high_heap_base); 178 } else { 179 heap_bottom = (char *) --- 30 unchanged lines hidden (view full) --- 210 /* Set up currdev variable to have hooks in place. */ 211 env_setenv("currdev", EV_VOLATILE, "", i386_setcurrdev, 212 env_nounset); 213 214 for (i = 0; devsw[i] != NULL; i++) 215 if (devsw[i]->dv_init != NULL) 216 (devsw[i]->dv_init)(); 217 | 172 173 bios_getmem(); 174 175 if (high_heap_size > 0) { 176 heap_top = PTOV(high_heap_base + high_heap_size); 177 heap_bottom = PTOV(high_heap_base); 178 } else { 179 heap_bottom = (char *) --- 30 unchanged lines hidden (view full) --- 210 /* Set up currdev variable to have hooks in place. */ 211 env_setenv("currdev", EV_VOLATILE, "", i386_setcurrdev, 212 env_nounset); 213 214 for (i = 0; devsw[i] != NULL; i++) 215 if (devsw[i]->dv_init != NULL) 216 (devsw[i]->dv_init)(); 217 |
218 disk_parsedev(&devdesc, boot_devname + 4, NULL); | 218 /* XXX assumes this will be a disk, but it looks likely give above */ 219 disk_parsedev((struct devdesc **)&devdesc, boot_devname + 4, NULL); |
219 | 220 |
220 bootdev = MAKEBOOTDEV(dev_maj[DEVT_DISK], devdesc.d_slice + 1, 221 devdesc.dd.d_unit, 222 devdesc.d_partition >= 0 ? devdesc.d_partition : 0xff); | 221 bootdev = MAKEBOOTDEV(dev_maj[DEVT_DISK], devdesc->d_slice + 1, 222 devdesc->dd.d_unit, 223 devdesc->d_partition >= 0 ? devdesc->d_partition : 0xff); 224 free(devdesc); |
223 224 /* 225 * devformat() can be called only after dv_init 226 */ 227 if (bdev != NULL && bdev->dd.d_dev->dv_type == DEVT_ZFS) { 228 /* set up proper device name string for ZFS */ 229 strncpy(boot_devname, devformat(&bdev->dd), sizeof (boot_devname)); 230 if (zfs_get_bootonce(bdev, OS_BOOTONCE, cmd, --- 490 unchanged lines hidden --- | 225 226 /* 227 * devformat() can be called only after dv_init 228 */ 229 if (bdev != NULL && bdev->dd.d_dev->dv_type == DEVT_ZFS) { 230 /* set up proper device name string for ZFS */ 231 strncpy(boot_devname, devformat(&bdev->dd), sizeof (boot_devname)); 232 if (zfs_get_bootonce(bdev, OS_BOOTONCE, cmd, --- 490 unchanged lines hidden --- |