From owner-svn-src-all@FreeBSD.ORG Wed Oct 22 02:08:55 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3BD410656AA; Wed, 22 Oct 2008 02:08:54 +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 E1D1B8FC18; Wed, 22 Oct 2008 02:08:54 +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 m9M28sSH014320; Wed, 22 Oct 2008 02:08:54 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9M28sV0014319; Wed, 22 Oct 2008 02:08:54 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200810220208.m9M28sV0014319@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 22 Oct 2008 02:08:54 +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: r184151 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Oct 2008 02:08:55 -0000 Author: marcel Date: Wed Oct 22 02:08:54 2008 New Revision: 184151 URL: http://svn.freebsd.org/changeset/base/184151 Log: Allow dumps to partitions with a tag of 0. The legacy sunlabel implementation in FreeBSD does not use VTOC information and as such as no partition types. Modified: head/sys/geom/part/g_part_vtoc8.c Modified: head/sys/geom/part/g_part_vtoc8.c ============================================================================== --- head/sys/geom/part/g_part_vtoc8.c Wed Oct 22 01:50:35 2008 (r184150) +++ head/sys/geom/part/g_part_vtoc8.c Wed Oct 22 02:08:54 2008 (r184151) @@ -266,10 +266,13 @@ g_part_vtoc8_dumpto(struct g_part_table struct g_part_vtoc8_table *table; uint16_t tag; - /* Allow dumping to a swap partition only. */ + /* + * Allow dumping to a swap partition or a partition that + * has no type. + */ table = (struct g_part_vtoc8_table *)basetable; tag = be16dec(&table->vtoc.part[entry->gpe_index - 1].tag); - return ((tag == VTOC_TAG_FREEBSD_SWAP) ? 1 : 0); + return ((tag == 0 || tag == VTOC_TAG_FREEBSD_SWAP) ? 1 : 0); } static int