Extending zfsboot.c to allow selecting filesystem from boot.config

Florian Wagner florian at wagner-flo.net
Sun Nov 20 18:10:22 UTC 2011


On Sun, 20 Nov 2011 17:22:30 +0200
Andriy Gapon <avg at FreeBSD.org> wrote:

> I think that the most straightforward way would be to checkout
> tools/tools/zfsboottest from head, copy it into a same named
> directory under stable/8, make it and run it.

I did just that:

# make MACHINE_CPUARCH=amd64
Warning: Object directory not changed from original /usr/src/stable-8/tools/tools/zfsboottest
cc -O1 -I/usr/src/stable-8/tools/tools/zfsboottest/../../../sys/boot/zfs  -I/usr/src/stable-8/tools/tools/zfsboottest/../../../sys/cddl/boot/zfs  -I.  -fdiagnostics-show-option  -W -Wextra -Wno-sign-compare -Wno-unused-parameter  -Werror -std=gnu99 -fstack-protector  -c zfsboottest.c In file included from /usr/include/sys/param.h:70,
                 from zfsboottest.c:30:
/usr/include/sys/types.h:146: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cpumask_t'
In file included from ./machine/param.h:36,
                 from /usr/include/sys/param.h:116,
                 from zfsboottest.c:30:
./machine/_align.h:6:24: error: x86/_align.h: No such file or directory
cc1: warnings being treated as errors
zfsboottest.c: In function 'main':
zfsboottest.c:141: warning: implicit declaration of function 'zfs_mount_pool'
zfsboottest.c:148: warning: passing argument 1 of 'zfs_lookup' from incompatible pointer type
zfsboottest.c:154: warning: passing argument 1 of 'zfs_dnode_stat' from incompatible pointer type


After look around a bit I found _types.h and param.h in the machine
subdirectory of zfsboottest. They get included from headers
in /usr/include because of the "-I.".

After renaming them only the errors about zfs_mount_pool and the
incompatible pointer types are left. Which make sense to me as this is
stuff changed in your patches.


Regards
Florian Wagner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20111120/825af84b/signature.pgp


More information about the freebsd-fs mailing list