bin/161950: commit references a PR

dfilter service dfilter at FreeBSD.ORG
Tue Oct 25 16:40:11 UTC 2011


The following reply was made to PR bin/161950; it has been noted by GNATS.

From: dfilter at FreeBSD.ORG (dfilter service)
To: bug-followup at FreeBSD.org
Cc:  
Subject: Re: bin/161950: commit references a PR
Date: Tue, 25 Oct 2011 16:30:42 +0000 (UTC)

 Author: nwhitehorn
 Date: Tue Oct 25 16:30:16 2011
 New Revision: 226739
 URL: http://svn.freebsd.org/changeset/base/226739
 
 Log:
   Provide an error message instead of silent failure if no disks are present
   in the system.
   
   PR:		bin/161950
   MFC after:	3 days
 
 Modified:
   head/usr.sbin/bsdinstall/partedit/partedit.c
 
 Modified: head/usr.sbin/bsdinstall/partedit/partedit.c
 ==============================================================================
 --- head/usr.sbin/bsdinstall/partedit/partedit.c	Tue Oct 25 16:22:43 2011	(r226738)
 +++ head/usr.sbin/bsdinstall/partedit/partedit.c	Tue Oct 25 16:30:16 2011	(r226739)
 @@ -70,7 +70,7 @@ main(int argc, const char **argv)
  {
  	struct partition_metadata *md;
  	const char *prompt;
 -	struct partedit_item *items;
 +	struct partedit_item *items = NULL;
  	struct gmesh mesh;
  	int i, op, nitems, nscroll;
  	int error;
 @@ -99,12 +99,21 @@ main(int argc, const char **argv)
  
  	/* Show the part editor either immediately, or to confirm wizard */
  	while (1) {
 -		error = geom_gettree(&mesh);
 -		items = read_geom_mesh(&mesh, &nitems);
 -		get_mount_points(items, nitems);
  		dlg_clear();
  		dlg_put_backtitle();
  
 +		error = geom_gettree(&mesh);
 +		if (error == 0)
 +			items = read_geom_mesh(&mesh, &nitems);
 +		if (error || items == NULL) {
 +			dialog_msgbox("Error", "No disks found. If you need to "
 +			    "install a kernel driver, choose Shell at the "
 +			    "installation menu.", 0, 0, TRUE);
 +			break;
 +		}
 +			
 +		get_mount_points(items, nitems);
 +
  		if (i >= nitems)
  			i = nitems - 1;
  		op = diskeditor_show("Partition Editor", prompt,
 _______________________________________________
 svn-src-all at freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
 


More information about the freebsd-sysinstall mailing list