Changeset View
Changeset View
Standalone View
Standalone View
stand/i386/libi386/devicename.c
Show All 23 Lines | |||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
*/ | */ | ||||
#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 "bootstrap.h" | #include "bootstrap.h" | ||||
imp: why include sys/mount.h? What's coming in from there? If it's just mount/umount prototypes, I'd… | |||||
#include "disk.h" | #include "disk.h" | ||||
#include "libi386.h" | #include "libi386.h" | ||||
#include "libzfs.h" | #include "libzfs.h" | ||||
static int i386_parsedev(struct i386_devdesc **dev, const char *devspec, const char **path); | static int i386_parsedev(struct i386_devdesc **dev, const char *devspec, const char **path); | ||||
/* | /* | ||||
* Point (dev) at an allocated device specifier for the device matching the | * Point (dev) at an allocated device specifier for the device matching the | ||||
▲ Show 20 Lines • Show All 158 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Set currdev to suit the value being supplied in (value) | * Set currdev to suit the value being supplied in (value) | ||||
*/ | */ | ||||
int | int | ||||
i386_setcurrdev(struct env_var *ev, int flags, const void *value) | i386_setcurrdev(struct env_var *ev, int flags, const void *value) | ||||
{ | { | ||||
struct i386_devdesc *ncurr; | struct i386_devdesc *ncurr; | ||||
int rv; | int rv; | ||||
if ((rv = i386_parsedev(&ncurr, value, NULL)) != 0) | if ((rv = i386_parsedev(&ncurr, value, NULL)) != 0) | ||||
return(rv); | return (rv); | ||||
free(ncurr); | free(ncurr); | ||||
env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); | |||||
return(0); | return (mount_currdev(ev, flags, value)); | ||||
} | } |
why include sys/mount.h? What's coming in from there? If it's just mount/umount prototypes, I'd suggest that maybe we should just put those in stand.h.