Changeset View
Changeset View
Standalone View
Standalone View
sys/boot/userboot/userboot/main.c
Show All 25 Lines | |||||
*/ | */ | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include <stand.h> | #include <stand.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include <setjmp.h> | #include <setjmp.h> | ||||
#include <sys/disk.h> | |||||
#include "bootstrap.h" | #include "bootstrap.h" | ||||
#include "disk.h" | #include "disk.h" | ||||
#include "libuserboot.h" | #include "libuserboot.h" | ||||
#if defined(USERBOOT_ZFS_SUPPORT) | #if defined(USERBOOT_ZFS_SUPPORT) | ||||
#include "../zfs/libzfs.h" | #include "../zfs/libzfs.h" | ||||
▲ Show 20 Lines • Show All 222 Lines • ▼ Show 20 Lines | command_reloadbe(int argc, char *argv[]) | ||||
} | } | ||||
if (err != 0) { | if (err != 0) { | ||||
command_errmsg = strerror(err); | command_errmsg = strerror(err); | ||||
return (CMD_ERROR); | return (CMD_ERROR); | ||||
} | } | ||||
return (CMD_OK); | return (CMD_OK); | ||||
} | |||||
uint64_t | |||||
ldi_get_size(void *priv) | |||||
{ | |||||
int fd = (uintptr_t) priv; | |||||
uint64_t size; | |||||
ioctl(fd, DIOCGMEDIASIZE, &size); | |||||
return (size); | |||||
} | } | ||||
#endif /* USERBOOT_ZFS_SUPPORT */ | #endif /* USERBOOT_ZFS_SUPPORT */ | ||||
COMMAND_SET(quit, "quit", "exit the loader", command_quit); | COMMAND_SET(quit, "quit", "exit the loader", command_quit); | ||||
static int | static int | ||||
command_quit(int argc, char *argv[]) | command_quit(int argc, char *argv[]) | ||||
{ | { | ||||
Show All 14 Lines |