From owner-svn-src-head@freebsd.org Fri Feb 26 15:52:57 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24191AB5C24; Fri, 26 Feb 2016 15:52:57 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE066C9F; Fri, 26 Feb 2016 15:52:56 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1QFqtuE019686; Fri, 26 Feb 2016 15:52:55 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1QFqtGC019685; Fri, 26 Feb 2016 15:52:55 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201602261552.u1QFqtGC019685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Fri, 26 Feb 2016 15:52:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296097 - head/sys/boot/userboot/userboot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Fri, 26 Feb 2016 15:52:57 -0000 Author: marcel Date: Fri Feb 26 15:52:55 2016 New Revision: 296097 URL: https://svnweb.freebsd.org/changeset/base/296097 Log: Check that the userboot version is at least 3, rather than 3 exactly. The structure may be of a newer version and as long as it is backward compatible with 3, we can work with it. While here: whitespace nits. Modified: head/sys/boot/userboot/userboot/main.c Modified: head/sys/boot/userboot/userboot/main.c ============================================================================== --- head/sys/boot/userboot/userboot/main.c Fri Feb 26 15:46:14 2016 (r296096) +++ head/sys/boot/userboot/userboot/main.c Fri Feb 26 15:52:55 2016 (r296097) @@ -43,6 +43,7 @@ static void userboot_zfs_probe(void); static int userboot_zfs_found; #endif +/* Minimum version required */ #define USERBOOT_VERSION USERBOOT_VERSION_3 #define MALLOCSZ (10*1024*1024) @@ -64,7 +65,7 @@ void delay(int usec) { - CALLBACK(delay, usec); + CALLBACK(delay, usec); } void @@ -82,11 +83,11 @@ loader_main(struct loader_callbacks *cb, const char *var; int i; - if (version != USERBOOT_VERSION) - abort(); + if (version < USERBOOT_VERSION) + abort(); callbacks = cb; - callbacks_arg = arg; + callbacks_arg = arg; userboot_disk_maxunit = ndisks; /* @@ -95,9 +96,9 @@ loader_main(struct loader_callbacks *cb, */ setheap((void *)mallocbuf, (void *)(mallocbuf + sizeof(mallocbuf))); - /* - * Hook up the console - */ + /* + * Hook up the console + */ cons_probe(); printf("\n"); @@ -192,9 +193,9 @@ extract_currdev(void) } env_setenv("currdev", EV_VOLATILE, userboot_fmtdev(&dev), - userboot_setcurrdev, env_nounset); + userboot_setcurrdev, env_nounset); env_setenv("loaddev", EV_VOLATILE, userboot_fmtdev(&dev), - env_noset, env_nounset); + env_noset, env_nounset); } #if defined(USERBOOT_ZFS_SUPPORT)