From owner-freebsd-sysinstall@FreeBSD.ORG Sun Oct 23 17:00:09 2011 Return-Path: Delivered-To: freebsd-sysinstall@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12A2A1065674 for ; Sun, 23 Oct 2011 17:00:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id CAD738FC0A for ; Sun, 23 Oct 2011 17:00:08 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p9NH08lL025457 for ; Sun, 23 Oct 2011 17:00:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p9NH08Rl025456; Sun, 23 Oct 2011 17:00:08 GMT (envelope-from gnats) Date: Sun, 23 Oct 2011 17:00:08 GMT Message-Id: <201110231700.p9NH08Rl025456@freefall.freebsd.org> To: freebsd-sysinstall@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: bin/161926: commit references a PR X-BeenThere: freebsd-sysinstall@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Sysinstall Work List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 17:00:09 -0000 The following reply was made to PR bin/161926; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: bin/161926: commit references a PR Date: Sun, 23 Oct 2011 16:57:20 +0000 (UTC) Author: nwhitehorn Date: Sun Oct 23 16:57:10 2011 New Revision: 226666 URL: http://svn.freebsd.org/changeset/base/226666 Log: Avoid some "Invalid argument" errors in the installer. PR: bin/161926 MFC after: 5 days Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/gpart_ops.c Sun Oct 23 16:27:03 2011 (r226665) +++ head/usr.sbin/bsdinstall/partedit/gpart_ops.c Sun Oct 23 16:57:10 2011 (r226666) @@ -392,8 +392,14 @@ gpart_destroy(struct ggeom *lg_geom) gctl_ro_param(r, "force", sizeof(force), &force); gctl_ro_param(r, "verb", -1, "destroy"); errstr = gctl_issue(r); - if (errstr != NULL && errstr[0] != '\0') - gpart_show_error("Error", NULL, errstr); + if (errstr != NULL && errstr[0] != '\0') { + /* + * Check if we reverted away the existence of the geom + * altogether. Show all other errors to the user. + */ + if (strtol(errstr, NULL, 0) != EINVAL) + gpart_show_error("Error", NULL, errstr); + } gctl_free(r); /* And any metadata associated with the partition scheme itself */ @@ -450,6 +456,10 @@ gpart_edit(struct gprovider *pp) return; } + /* If this is a nested partition, edit as usual */ + if (strcmp(pp->lg_geom->lg_class->lg_name, "PART") == 0) + break; + /* Destroy the geom and all sub-partitions */ gpart_destroy(cp->lg_geom); @@ -507,7 +517,7 @@ editpart: choice = dlg_form("Edit Partition", "", 0, 0, 0, nitems, items, &junk); if (choice) /* Cancel pressed */ - return; + goto endedit; /* Check if the label has a / in it */ if (strchr(items[3].text, '/') != NULL) { @@ -538,6 +548,13 @@ editpart: items[2].text, (strcmp(oldtype, items[0].text) != 0) ? newfs : NULL); +endedit: + if (strcmp(oldtype, items[0].text) != 0 && cp != NULL) + gpart_destroy(cp->lg_geom); + if (strcmp(oldtype, items[0].text) != 0 && strcmp(items[0].text, + "freebsd") == 0) + gpart_partition(pp->lg_name, "BSD"); + for (i = 0; i < (sizeof(items) / sizeof(items[0])); i++) if (items[i].text_free) free(items[i].text); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"