From mjl@luckie.org.nz  Sun Jun  8 10:12:27 2008
Return-Path: <mjl@luckie.org.nz>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 983C9106566B
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  8 Jun 2008 10:12:27 +0000 (UTC)
	(envelope-from mjl@luckie.org.nz)
Received: from mailfilter14.ihug.co.nz (mailfilter14.ihug.co.nz [203.109.136.14])
	by mx1.freebsd.org (Postfix) with ESMTP id 13D5E8FC17
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  8 Jun 2008 10:12:26 +0000 (UTC)
	(envelope-from mjl@luckie.org.nz)
Received: from 118-93-143-142.dsl.dyn.ihug.co.nz (HELO spandex.luckie.org.nz) ([118.93.143.142])
  by smtp.mailfilter6.ihug.co.nz with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Jun 2008 22:12:24 +1200
Received: from d19.luckie.org.nz ([192.168.1.19] helo=mylar.luckie.org.nz)
	by spandex.luckie.org.nz with esmtps (TLSv1:AES256-SHA:256)
	(Exim 4.69 (FreeBSD))
	(envelope-from <mjl@luckie.org.nz>)
	id 1K5Hsu-0005zE-86
	for FreeBSD-gnats-submit@freebsd.org; Sun, 08 Jun 2008 22:12:24 +1200
Received: from mjl by mylar.luckie.org.nz with local (Exim 4.69 (FreeBSD))
	(envelope-from <mjl@mylar.luckie.org.nz>)
	id 1K5Hsu-0000zI-ND
	for FreeBSD-gnats-submit@freebsd.org; Sun, 08 Jun 2008 22:12:24 +1200
Message-Id: <E1K5Hsu-0000zI-ND@mylar.luckie.org.nz>
Date: Sun, 08 Jun 2008 22:12:24 +1200
From: Matthew Luckie <mjl@luckie.org.nz>
Sender: Matthew Luckie <mjl@luckie.org.nz>
Reply-To: Matthew Luckie <mjl@luckie.org.nz>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] bootparamd does not work on arm
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         124392
>Category:       bin
>Synopsis:       [patch] bootparamd(8) does not work on arm
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 08 10:20:02 UTC 2008
>Closed-Date:    Fri Nov 02 22:22:38 UTC 2012
>Last-Modified:  Fri Nov 02 22:22:38 UTC 2012
>Originator:     Matthew Luckie
>Release:        FreeBSD 7.0-RELEASE arm
>Organization:
>Environment:
System: FreeBSD mylar.luckie.org.nz 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:
	code assumes char is a signed integer, which it is not on arm.
	bootparamd, when run on arm, will enter an infinite loop since c
	will never hold the value -1.
>How-To-Repeat:
	
>Fix:

--- patch-bootparamd-main.c begins here ---
--- usr.sbin/bootparamd/bootparamd/main.c.orig	2004-06-09 00:11:19.000000000 +1200
+++ usr.sbin/bootparamd/bootparamd/main.c	2008-05-19 20:05:19.000000000 +1200
@@ -47,10 +47,10 @@ char **argv;
 	SVCXPRT *transp;
 	struct hostent *he;
 	struct stat buf;
-	char c;
+	int c;
 
 	while ((c = getopt(argc, argv,"dsr:f:")) != -1)
 	  switch (c) {
 	  case 'd':
 	    debug = 1;
 	    break;
--- patch-bootparamd-main.c ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->rink 
Responsible-Changed-By: rink 
Responsible-Changed-When: Sun Jun 8 10:54:34 UTC 2008 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=124392 
State-Changed-From-To: open->patched 
State-Changed-By: gavin 
State-Changed-When: Sun Jan 3 18:43:00 UTC 2010 
State-Changed-Why:  
This was fixed in r181125 and r181143 and made it into 8, but has not 
yet been MFC'd. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=124392 
Responsible-Changed-From-To: rink->freebsd-bugs 
Responsible-Changed-By: rink 
Responsible-Changed-When: Thu Oct 28 06:53:26 UTC 2010 
Responsible-Changed-Why:  
Hand back to the pool; I don't have time to work on this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=124392 
State-Changed-From-To: patched->closed 
State-Changed-By: eadler 
State-Changed-When: Fri Nov 2 22:22:36 UTC 2012 
State-Changed-Why:  
MFCed/fixed by now or it will never be MFCed 

http://www.freebsd.org/cgi/query-pr.cgi?pr=124392 
>Unformatted:
