Changeset View
Changeset View
Standalone View
Standalone View
head/sys/boot/common/disk.c
Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | |||||
int | int | ||||
ptblread(void *d, void *buf, size_t blocks, uint64_t offset) | ptblread(void *d, void *buf, size_t blocks, uint64_t offset) | ||||
{ | { | ||||
struct disk_devdesc *dev; | struct disk_devdesc *dev; | ||||
struct open_disk *od; | struct open_disk *od; | ||||
dev = (struct disk_devdesc *)d; | dev = (struct disk_devdesc *)d; | ||||
od = (struct open_disk *)dev->d_opendata; | od = (struct open_disk *)dev->d_opendata; | ||||
return (dev->d_dev->dv_strategy(dev, F_READ, offset, | |||||
/* | |||||
* As the GPT backup partition is located at the end of the disk, | |||||
* to avoid reading past disk end, flag bcache not to use RA. | |||||
*/ | |||||
return (dev->d_dev->dv_strategy(dev, F_READ | F_NORA, offset, | |||||
blocks * od->sectorsize, (char *)buf, NULL)); | blocks * od->sectorsize, (char *)buf, NULL)); | ||||
} | } | ||||
#define PWIDTH 35 | #define PWIDTH 35 | ||||
static int | static int | ||||
ptable_print(void *arg, const char *pname, const struct ptable_entry *part) | ptable_print(void *arg, const char *pname, const struct ptable_entry *part) | ||||
{ | { | ||||
struct disk_devdesc dev; | struct disk_devdesc dev; | ||||
▲ Show 20 Lines • Show All 323 Lines • Show Last 20 Lines |