From owner-svn-src-head@FreeBSD.ORG Sun Feb 8 20:15:09 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 057661065673; Sun, 8 Feb 2009 20:15:09 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E793F8FC1A; Sun, 8 Feb 2009 20:15:08 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n18KF8eR033178; Sun, 8 Feb 2009 20:15:08 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n18KF8WA033177; Sun, 8 Feb 2009 20:15:08 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200902082015.n18KF8WA033177@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 8 Feb 2009 20:15:08 +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: r188329 - head/sys/geom/part 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: Sun, 08 Feb 2009 20:15:09 -0000 Author: marcel Date: Sun Feb 8 20:15:08 2009 New Revision: 188329 URL: http://svn.freebsd.org/changeset/base/188329 Log: o Add the "PART::scheme" attribute that returns the name of the underlying partitioning scheme. o Put the start and end of the partition in the XML configuration. The start and end are the LBAs of the first and last sector (resp.) of the partition. They are currently identical to the offset and size attributes, which describe the partition as an offset and size in bytes, but may not in the future. The start and end will be used for the logical partition boundaries and may include metadata. The offset and size will always represent the useful storage space within the partition. Typically these two notions are the same, but for logical partitions in an extended partition, the EBR is more naturally treated as being part of the partition. Modified: head/sys/geom/part/g_part.c Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Sun Feb 8 20:07:50 2009 (r188328) +++ head/sys/geom/part/g_part.c Sun Feb 8 20:15:08 2009 (r188329) @@ -1579,6 +1579,10 @@ g_part_dumpconf(struct sbuf *sb, const c entry = pp->private; if (entry == NULL) return; + sbuf_printf(sb, "%s%ju\n", indent, + (uintmax_t)entry->gpe_start); + sbuf_printf(sb, "%s%ju\n", indent, + (uintmax_t)entry->gpe_end); sbuf_printf(sb, "%s%u\n", indent, entry->gpe_index); sbuf_printf(sb, "%s%s\n", indent, @@ -1687,6 +1691,9 @@ g_part_start(struct bio *bp) if (g_handleattr_int(bp, "PART::offset", table->gpt_offset + entry->gpe_start)) return; + if (g_handleattr_str(bp, "PART::scheme", + table->gpt_scheme->name)) + return; if (!strcmp("GEOM::kerneldump", bp->bio_attribute)) { /* * Check that the partition is suitable for kernel