Skip to content

Commit

Permalink
Stop using ../zfs/libzfs.h but instead use libzfs.h.
Browse files Browse the repository at this point in the history
While ../zfs/libzfs.h mostly works, there are a few situations where
it does not. Eliminate the problem by using plain libzfs.h, like we do
for ufs support. This fixes the weird cases, and is easier to
understand. It also follows the general style convetion of avoiding
../ in #includes.
  • Loading branch information
bsdimp committed Jul 8, 2018
1 parent b8902de commit 007b82d
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion stand/common/zfs_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
#include "bootstrap.h"

#ifdef LOADER_ZFS_SUPPORT
#include "../zfs/libzfs.h"
#include "libzfs.h"
#endif

COMMAND_SET(lszfs, "lszfs", "list child datasets of a zfs dataset",
Expand Down
1 change: 1 addition & 0 deletions stand/i386/libi386/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ SRCS= biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp.c \
smbios.c time.c vidconsole.c amd64_tramp.S spinconsole.c
.PATH: ${ZFSSRC}
SRCS+= devicename_stubs.c
CFLAGS+= -I${ZFSSRC}

BOOT_COMCONSOLE_PORT?= 0x3f8
CFLAGS+= -DCOMPORT=${BOOT_COMCONSOLE_PORT}
Expand Down
2 changes: 1 addition & 1 deletion stand/i386/libi386/devicename.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ __FBSDID("$FreeBSD$");
#include "bootstrap.h"
#include "disk.h"
#include "libi386.h"
#include "../zfs/libzfs.h"
#include "libzfs.h"

static int i386_parsedev(struct i386_devdesc **dev, const char *devspec, const char **path);

Expand Down
2 changes: 1 addition & 1 deletion stand/i386/loader/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$");
#include <bootstrap.h>
#include "libi386/libi386.h"
#if defined(LOADER_ZFS_SUPPORT)
#include "../zfs/libzfs.h"
#include "libzfs.h"
#endif

/*
Expand Down
2 changes: 1 addition & 1 deletion stand/i386/loader/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$");
#include "btxv86.h"

#ifdef LOADER_ZFS_SUPPORT
#include "../zfs/libzfs.h"
#include "libzfs.h"
#endif

CTASSERT(sizeof(struct bootargs) == BOOTARGS_SIZE);
Expand Down
1 change: 1 addition & 0 deletions stand/ofw/libofw/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ SRCS= devicename.c ofw_console.c ofw_copy.c ofw_disk.c \
ofw_time.c openfirm.c
.PATH: ${ZFSSRC}
SRCS+= devicename_stubs.c
CFLAGS+= -I${ZFSSRC}

# Pick up the bootstrap header for some interface items
CFLAGS+= -I${LDRSRC}
Expand Down
2 changes: 1 addition & 1 deletion stand/ofw/libofw/devicename.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$");

#include "bootstrap.h"
#include "libofw.h"
#include "../zfs/libzfs.h"
#include "libzfs.h"

static int ofw_parsedev(struct ofw_devdesc **, const char *, const char **);

Expand Down
2 changes: 1 addition & 1 deletion stand/sparc64/loader/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$");
#include <sys/types.h>
#ifdef LOADER_ZFS_SUPPORT
#include <sys/vtoc.h>
#include "../zfs/libzfs.h"
#include "libzfs.h"
#endif

#include <vm/vm.h>
Expand Down
2 changes: 1 addition & 1 deletion stand/userboot/userboot/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
#include "libuserboot.h"

#if defined(USERBOOT_ZFS_SUPPORT)
#include "../zfs/libzfs.h"
#include "libzfs.h"
#endif

/*
Expand Down
2 changes: 1 addition & 1 deletion stand/userboot/userboot/devicename.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$");
#include "libuserboot.h"

#if defined(USERBOOT_ZFS_SUPPORT)
#include "../zfs/libzfs.h"
#include "libzfs.h"
#endif

static int userboot_parsedev(struct disk_devdesc **dev, const char *devspec, const char **path);
Expand Down
2 changes: 1 addition & 1 deletion stand/userboot/userboot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$");
#include "libuserboot.h"

#if defined(USERBOOT_ZFS_SUPPORT)
#include "../zfs/libzfs.h"
#include "libzfs.h"

static void userboot_zfs_probe(void);
static int userboot_zfs_found;
Expand Down

0 comments on commit 007b82d

Please sign in to comment.