Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jun 2012 10:28:41 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r237769 - in stable/8: sys/boot/pc98/libpc98 sys/boot/zfs tools/tools/ath/common tools/tools/termcap tools/tools/zfsboottest
Message-ID:  <201206291028.q5TASfx0040027@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Fri Jun 29 10:28:40 2012
New Revision: 237769
URL: http://svn.freebsd.org/changeset/base/237769

Log:
  MFC r235392,235394,235395: fixes and cleanups for zfs boot MFC

Modified:
  stable/8/sys/boot/pc98/libpc98/Makefile
  stable/8/sys/boot/zfs/zfs.c
  stable/8/tools/tools/zfsboottest/zfsboottest.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/tools/tools/   (props changed)
  stable/8/tools/tools/aac/   (props changed)
  stable/8/tools/tools/ath/   (props changed)
  stable/8/tools/tools/ath/common/dumpregs.h   (props changed)
  stable/8/tools/tools/ath/common/dumpregs_5210.c   (props changed)
  stable/8/tools/tools/ath/common/dumpregs_5211.c   (props changed)
  stable/8/tools/tools/ath/common/dumpregs_5212.c   (props changed)
  stable/8/tools/tools/ath/common/dumpregs_5416.c   (props changed)
  stable/8/tools/tools/cfi/   (props changed)
  stable/8/tools/tools/ether_reflect/   (props changed)
  stable/8/tools/tools/iwi/   (props changed)
  stable/8/tools/tools/mctest/   (props changed)
  stable/8/tools/tools/nanobsd/   (props changed)
  stable/8/tools/tools/netrate/   (props changed)
  stable/8/tools/tools/netrate/netblast/   (props changed)
  stable/8/tools/tools/netrate/netsend/   (props changed)
  stable/8/tools/tools/netrate/tcpp/   (props changed)
  stable/8/tools/tools/termcap/termcap.pl   (props changed)
  stable/8/tools/tools/umastat/   (props changed)
  stable/8/tools/tools/vimage/   (props changed)

Modified: stable/8/sys/boot/pc98/libpc98/Makefile
==============================================================================
--- stable/8/sys/boot/pc98/libpc98/Makefile	Fri Jun 29 10:22:35 2012	(r237768)
+++ stable/8/sys/boot/pc98/libpc98/Makefile	Fri Jun 29 10:28:40 2012	(r237769)
@@ -10,6 +10,8 @@ SRCS=	bioscd.c biosdisk.c biosmem.c bios
 	comconsole.c devicename.c elf32_freebsd.c \
 	i386_copy.c i386_module.c nullconsole.c pc98_sys.c pxe.c pxetramp.s \
 	time.c vidconsole.c
+.PATH:	${.CURDIR}/../../zfs
+SRCS+=	devicename_stubs.c
 
 # Enable PXE TFTP or NFS support, not both.
 .if defined(LOADER_TFTP_SUPPORT)

Modified: stable/8/sys/boot/zfs/zfs.c
==============================================================================
--- stable/8/sys/boot/zfs/zfs.c	Fri Jun 29 10:22:35 2012	(r237768)
+++ stable/8/sys/boot/zfs/zfs.c	Fri Jun 29 10:28:40 2012	(r237769)
@@ -56,7 +56,6 @@ static int	zfs_stat(struct open_file *f,
 static int	zfs_readdir(struct open_file *f, struct dirent *d);
 
 struct devsw zfs_dev;
-struct devsw zfs_dev_compat;
 
 struct fs_ops zfs_fsops = {
 	"zfs",
@@ -90,7 +89,7 @@ zfs_open(const char *upath, struct open_
 	struct file *fp;
 	int rc;
 
-	if (f->f_dev != &zfs_dev && f->f_dev != &zfs_dev_compat)
+	if (f->f_dev != &zfs_dev)
 		return (EINVAL);
 
 	/* allocate file system specific data structure */

Modified: stable/8/tools/tools/zfsboottest/zfsboottest.c
==============================================================================
--- stable/8/tools/tools/zfsboottest/zfsboottest.c	Fri Jun 29 10:22:35 2012	(r237768)
+++ stable/8/tools/tools/zfsboottest/zfsboottest.c	Fri Jun 29 10:28:40 2012	(r237769)
@@ -89,7 +89,11 @@ main(int argc, char** argv)
 	char buf[512], hash[33];
 	MD5_CTX ctx;
 	struct stat sb;
+	struct zfsmount zfsmnt;
 	dnode_phys_t dn;
+#if 0
+	uint64_t rootobj;
+#endif
 	spa_t *spa;
 	off_t off;
 	ssize_t n;
@@ -138,14 +142,28 @@ main(int argc, char** argv)
 		exit(1);
 	}
 
-	if (zfs_mount_pool(spa)) {
-		fprintf(stderr, "can't mount pool\n");
+	if (zfs_spa_init(spa)) {
+		fprintf(stderr, "can't init pool\n");
 		exit(1);
 	}
 
+#if 0
+	if (zfs_get_root(spa, &rootobj)) {
+		fprintf(stderr, "can't get root\n");
+		exit(1);
+	}
+
+	if (zfs_mount(spa, rootobj, &zfsmnt)) {
+#else
+	if (zfs_mount(spa, 0, &zfsmnt)) {
+		fprintf(stderr, "can't mount\n");
+		exit(1);
+	}
+#endif
+
 	printf("\n");
 	for (++i, failures = 0; i < argc; i++) {
-		if (zfs_lookup(spa, argv[i], &dn)) {
+		if (zfs_lookup(&zfsmnt, argv[i], &dn)) {
 			fprintf(stderr, "%s: can't lookup\n", argv[i]);
 			failures++;
 			continue;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206291028.q5TASfx0040027>