From owner-freebsd-fs@FreeBSD.ORG Mon Nov 21 10:53:55 2011 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC7CC106564A for ; Mon, 21 Nov 2011 10:53:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 04BB88FC08 for ; Mon, 21 Nov 2011 10:53:54 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA19267; Mon, 21 Nov 2011 12:53:51 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1RSRVX-000PSX-Ch; Mon, 21 Nov 2011 12:53:51 +0200 Message-ID: <4ECA2DBD.5040701@FreeBSD.org> Date: Mon, 21 Nov 2011 12:53:49 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111108 Thunderbird/8.0 MIME-Version: 1.0 To: Florian Wagner References: <20111015214347.09f68e4e@naclador.mos32.de> <4E9ACA9F.5090308@FreeBSD.org> <20111019082139.1661868e@auedv3.syscomp.de> <4E9EEF45.9020404@FreeBSD.org> <20111019182130.27446750@naclador.mos32.de> <4EB98E05.4070900@FreeBSD.org> <20111119211921.7ffa9953@naclador.mos32.de> <4EC8CD14.4040600@FreeBSD.org> <20111120121248.5e9773c8@naclador.mos32.de> <4EC91B36.7060107@FreeBSD.org> <20111120191018.1aa4e882@naclador.mos32.de> In-Reply-To: <20111120191018.1aa4e882@naclador.mos32.de> X-Enigmail-Version: undefined Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-fs@FreeBSD.org Subject: Re: Extending zfsboot.c to allow selecting filesystem from boot.config X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2011 10:53:55 -0000 on 20/11/2011 20:10 Florian Wagner said the following: > On Sun, 20 Nov 2011 17:22:30 +0200 > Andriy Gapon 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 Why did you have to specify MACHINE_CPUARCH? Is your OS amd64 or i386? > Warning: Object directory not changed from original /usr/src/stable-8/tools/tools/zfsboottest BTW, proper build procedure is make obj depend all, so that the source tree is not polluted. > 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.". This is intentional and used to work perfectly for me on head. > 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. Here is the latest version from my tree: https://gitorious.org/~avg/freebsd/avgbsd/trees/devel-20110921/tools/tools/zfsboottest Unfortunately I haven't rebased to head for a long time, so it's a quite out of sync with the latest changes there, but it should give you an idea on how to adapt zfsboottest.c to the patches. -- Andriy Gapon