bin/124392: [patch] bootparamd does not work on arm

Matthew Luckie mjl at luckie.org.nz
Sun Jun 8 10:20:02 UTC 2008


>Number:         124392
>Category:       bin
>Synopsis:       [patch] bootparamd does not work on arm
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 08 10:20:02 UTC 2008
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:


More information about the freebsd-bugs mailing list