Subject: Re: exit() undefined in bootloader build
To: None <port-i386@netbsd.org, tech-kern@netbsd.org>
From: Jun-ichiro itojun Hagino <itojun@iijlab.net>
List: port-i386
Date: 06/01/2002 15:17:35
>>	where can we find prototype decl for exit() in bootloader build
>>	environment? (libsa)
>	does it look correct?

	or, is it more proper?  (exit() with no arg)
	anyways, arch/i386/stand uses exit() inconsistently.

itojun


Index: lib/libsa/exit.c
===================================================================
RCS file: /cvsroot/syssrc/sys/lib/libsa/exit.c,v
retrieving revision 1.13
diff -u -r1.13 exit.c
--- lib/libsa/exit.c	1999/02/12 10:51:28	1.13
+++ lib/libsa/exit.c	2002/06/01 06:17:22
@@ -30,8 +30,6 @@
 
 #include "stand.h"
 
-__dead void	exit __P((void)) __attribute__((noreturn));
-
 void
 exit()
 {
Index: lib/libsa/stand.h
===================================================================
RCS file: /cvsroot/syssrc/sys/lib/libsa/stand.h,v
retrieving revision 1.43
diff -u -r1.43 stand.h
--- lib/libsa/stand.h	2001/09/02 07:04:16	1.43
+++ lib/libsa/stand.h	2002/06/01 06:17:24
@@ -228,6 +228,7 @@
 void	gets __P((char *));
 int	getfile __P((char *prompt, int mode));
 char	*strerror __P((int));
+__dead void	exit __P((void)) __attribute__((noreturn));
 __dead void	panic __P((const char *, ...)) __attribute__((noreturn));
 __dead void	_rtt __P((void)) __attribute__((noreturn));
 void	bcopy __P((const void *, void *, size_t));
Index: arch/i386/stand/dosboot/main.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/i386/stand/dosboot/main.c,v
retrieving revision 1.18
diff -u -r1.18 main.c
--- arch/i386/stand/dosboot/main.c	2001/07/05 00:58:45	1.18
+++ arch/i386/stand/dosboot/main.c	2002/06/01 06:17:25
@@ -345,7 +345,7 @@
 	char *arg;
 {
 	printf("Exiting... goodbye...\n");
-	exit(0);
+	exit();
 }
 
 void
Index: arch/i386/stand/netboot/main.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/i386/stand/netboot/main.c,v
retrieving revision 1.10
diff -u -r1.10 main.c
--- arch/i386/stand/netboot/main.c	2001/07/05 00:58:45	1.10
+++ arch/i386/stand/netboot/main.c	2002/06/01 06:17:27
@@ -129,7 +129,7 @@
 	char *arg;
 {
 	printf("Exiting... goodbye...\n");
-	exit(0);
+	exit();
 }
 
 void
Index: arch/i386/stand/pxeboot/main.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/i386/stand/pxeboot/main.c,v
retrieving revision 1.4
diff -u -r1.4 main.c
--- arch/i386/stand/pxeboot/main.c	2002/02/20 03:00:27	1.4
+++ arch/i386/stand/pxeboot/main.c	2002/06/01 06:17:27
@@ -157,7 +157,7 @@
 command_quit(char *arg)
 {
 	printf("Exiting... goodbye...\n");
-	exit(0);
+	exit();
 }
 
 void