Changeset View
Changeset View
Standalone View
Standalone View
head/usr.sbin/bhyveload/bhyveload.c
Show First 20 Lines • Show All 603 Lines • ▼ Show 20 Lines | altcons_open(char *path) | ||||
return (err); | return (err); | ||||
} | } | ||||
static int | static int | ||||
disk_open(char *path) | disk_open(char *path) | ||||
{ | { | ||||
int err, fd; | int err, fd; | ||||
if (ndisks > NDISKS) | if (ndisks >= NDISKS) | ||||
return (ERANGE); | return (ERANGE); | ||||
err = 0; | err = 0; | ||||
fd = open(path, O_RDONLY); | fd = open(path, O_RDONLY); | ||||
if (fd > 0) { | if (fd > 0) { | ||||
disk_fd[ndisks] = fd; | disk_fd[ndisks] = fd; | ||||
ndisks++; | ndisks++; | ||||
▲ Show 20 Lines • Show All 126 Lines • Show Last 20 Lines |