From owner-svn-src-head@FreeBSD.ORG Wed Oct 14 14:13:42 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98C4010656C2; Wed, 14 Oct 2009 14:13:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 87A8A8FC46; Wed, 14 Oct 2009 14:13:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9EEDgl6039066; Wed, 14 Oct 2009 14:13:42 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9EEDgQo039064; Wed, 14 Oct 2009 14:13:42 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200910141413.n9EEDgQo039064@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Oct 2009 14:13:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198079 - head/sys/boot/i386/zfsboot X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2009 14:13:42 -0000 Author: jhb Date: Wed Oct 14 14:13:42 2009 New Revision: 198079 URL: http://svn.freebsd.org/changeset/base/198079 Log: Use zfs_read() instead of xfsread() to read /boot.config. xfsread() fails short read requests, so the result was that a /boot.config smaller than 512 bytes was ignored. boot2 uses fsread() instead of xfsread() to read /boot.config already, so this makes zfsboot more like boot2. Submitted by: Johny Mattsson johny-freebsd of earthmagic org Reviewed by: dfr MFC after: 3 days Modified: head/sys/boot/i386/zfsboot/zfsboot.c Modified: head/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- head/sys/boot/i386/zfsboot/zfsboot.c Wed Oct 14 13:58:24 2009 (r198078) +++ head/sys/boot/i386/zfsboot/zfsboot.c Wed Oct 14 14:13:42 2009 (r198079) @@ -609,7 +609,7 @@ main(void) if (zfs_lookup(spa, PATH_CONFIG, &dn) == 0) { off = 0; - xfsread(&dn, &off, cmd, sizeof(cmd)); + zfs_read(spa, &dn, &off, cmd, sizeof(cmd)); } if (*cmd) {