From owner-p4-projects@FreeBSD.ORG Mon May 22 10:02:59 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 309AB16A45E; Mon, 22 May 2006 10:02:59 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E5BB916A45C for ; Mon, 22 May 2006 10:02:58 +0000 (UTC) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC99843D45 for ; Mon, 22 May 2006 10:02:58 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k4MA2HGu034468 for ; Mon, 22 May 2006 10:02:17 GMT (envelope-from soc-andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k4MA2GnG034465 for perforce@freebsd.org; Mon, 22 May 2006 10:02:16 GMT (envelope-from soc-andrew@freebsd.org) Date: Mon, 22 May 2006 10:02:16 GMT Message-Id: <200605221002.k4MA2GnG034465@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-andrew@freebsd.org using -f From: soc-andrew To: Perforce Change Reviews Cc: Subject: PERFORCE change 97611 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2006 10:02:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=97611 Change 97611 by soc-andrew@soc-andrew_serv on 2006/05/22 10:01:57 Start the first partition on a slice at offset 16 Affected files ... .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/storage.lua#6 edit Differences ... ==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/storage.lua#6 (text+ko) ==== @@ -1,4 +1,4 @@ --- $Id: storage.lua,v 1.182 2005/10/28 02:48:02 cpressey Exp $ +-- $Id: storage.lua,v 1.184 2006/05/17 21:30:03 sullrich Exp $ -- Storage Descriptors (a la libinstaller) in Lua. -- @@ -1976,7 +1976,24 @@ -- to the slice, so it starts at 0; on NetBSD/OpenBSD, it is -- relative to the disk, so it starts where the slice starts. -- + -- DragonFlyBSD starts at an offset of 0, whereas bsdlabel on + -- FreeBSD suggests a starting point of 16. Net/Open starts + -- at an offset of 32. + -- local offset = 0 + local starting_offset = 0 + if App.conf.os.name == "FreeBSD" then + starting_offset = 16 + offset = 16 + end + if App.conf.os.name == "OpenBSD" then + starting_offset = 32 + offset = 32 + end + if App.conf.os.name == "NetBSD" then + starting_offset = 32 + offset = 32 + end if App.conf.disklabel_on_disk then offset = self:get_start() end @@ -1996,6 +2013,12 @@ end local spd_size = spd:get_capacity():in_units("S") + if starting_offset > 0 then + -- adjust the starting offset + spd_size = spd_size - starting_offset + -- only change a: + starting_offset = 0 + end cmds:set_replacements{ letter = spd:get_letter(), fsize = spd:get_fsize(),