Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 May 2006 10:02:16 GMT
From:      soc-andrew <soc-andrew@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 97611 for review
Message-ID:  <200605221002.k4MA2GnG034465@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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(),



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