[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
hurd-l4/laden ia32-output.c ia32-shutdown.c lad...
From: |
Marcus Brinkmann |
Subject: |
hurd-l4/laden ia32-output.c ia32-shutdown.c lad... |
Date: |
Sun, 07 Sep 2003 18:13:04 -0400 |
CVSROOT: /cvsroot/hurd
Module name: hurd-l4
Branch:
Changes by: Marcus Brinkmann <address@hidden> 03/09/07 18:13:04
Modified files:
laden : ia32-output.c ia32-shutdown.c laden.c
output-none.c output-vga.c output.c output.h
shutdown.h string.c string.h
Log message:
Small cleanups.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/laden/ia32-output.c.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/laden/ia32-shutdown.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/laden/laden.c.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/laden/output-none.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/laden/output-vga.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/laden/output.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/laden/output.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/laden/shutdown.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/laden/string.c.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/laden/string.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: hurd-l4/laden/ia32-output.c
diff -u hurd-l4/laden/ia32-output.c:1.1 hurd-l4/laden/ia32-output.c:1.2
--- hurd-l4/laden/ia32-output.c:1.1 Sat Jul 26 13:26:09 2003
+++ hurd-l4/laden/ia32-output.c Sun Sep 7 18:13:04 2003
@@ -18,8 +18,13 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
-#include "laden.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include "output.h"
+
+
extern struct output_driver vga_output;
extern struct output_driver no_output;
Index: hurd-l4/laden/ia32-shutdown.c
diff -u hurd-l4/laden/ia32-shutdown.c:1.2 hurd-l4/laden/ia32-shutdown.c:1.3
--- hurd-l4/laden/ia32-shutdown.c:1.2 Sun Sep 7 16:56:46 2003
+++ hurd-l4/laden/ia32-shutdown.c Sun Sep 7 18:13:04 2003
@@ -18,6 +18,10 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <sys/io.h>
#include "shutdown.h"
Index: hurd-l4/laden/laden.c
diff -u hurd-l4/laden/laden.c:1.3 hurd-l4/laden/laden.c:1.4
--- hurd-l4/laden/laden.c:1.3 Sun Sep 7 16:56:46 2003
+++ hurd-l4/laden/laden.c Sun Sep 7 18:13:04 2003
@@ -99,7 +99,9 @@
else if (!strcmp (argv[i], "-o") || !strcmp (argv[i], "--output"))
{
i++;
- output_init (argv[i++]);
+ if (!output_init (argv[i]))
+ panic ("Unknown output driver %s", argv[i]);
+ i++;
}
else if (!strcmp (argv[i], "-h") || !strcmp (argv[i], "--halt"))
{
Index: hurd-l4/laden/output-none.c
diff -u hurd-l4/laden/output-none.c:1.2 hurd-l4/laden/output-none.c:1.3
--- hurd-l4/laden/output-none.c:1.2 Sat Jul 26 15:19:14 2003
+++ hurd-l4/laden/output-none.c Sun Sep 7 18:13:04 2003
@@ -18,7 +18,11 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
-#include "laden.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "output.h"
struct output_driver no_output =
{
Index: hurd-l4/laden/output-vga.c
diff -u hurd-l4/laden/output-vga.c:1.2 hurd-l4/laden/output-vga.c:1.3
--- hurd-l4/laden/output-vga.c:1.2 Wed Sep 3 21:29:35 2003
+++ hurd-l4/laden/output-vga.c Sun Sep 7 18:13:04 2003
@@ -18,9 +18,13 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
-#include "laden.h"
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <sys/io.h>
+
+#include "output.h"
#define VGA_VIDEO_MEM_BASE_ADDR 0x0B8000
#define VGA_VIDEO_MEM_LENGTH 0x004000
Index: hurd-l4/laden/output.c
diff -u hurd-l4/laden/output.c:1.2 hurd-l4/laden/output.c:1.3
--- hurd-l4/laden/output.c:1.2 Sun Sep 7 15:49:01 2003
+++ hurd-l4/laden/output.c Sun Sep 7 18:13:04 2003
@@ -18,9 +18,13 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <stdarg.h>
-#include "laden.h"
+#include "output.h"
/* The active output driver. */
@@ -29,8 +33,9 @@
/* Activate the output driver NAME or the default one if NAME is a
null pointer. Must be called once at startup, before calling
- putchar or any other output routine. */
-void
+ putchar or any other output routine. Returns 0 if NAME is not a
+ valid output driver name, otherwise 1 on success. */
+int
output_init (char *name)
{
if (output)
@@ -49,13 +54,15 @@
out++;
}
if (!output)
- panic ("Unknown output driver %s", name);
+ return 0;
}
else
output = output_drivers[0];
if (output->init)
(*output->init) ();
+
+ return 1;
}
Index: hurd-l4/laden/output.h
diff -u hurd-l4/laden/output.h:1.1 hurd-l4/laden/output.h:1.2
--- hurd-l4/laden/output.h:1.1 Sun Sep 7 16:04:25 2003
+++ hurd-l4/laden/output.h Sun Sep 7 18:13:04 2003
@@ -18,6 +18,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
+#ifndef _OUTPUT_H
+#define _OUTPUT_H 1
+
/* Every architecture must define at least one output driver, but might
define several. For each output driver, the name and operations on
@@ -46,9 +49,9 @@
/* Activate the output driver NAME or the default one if NAME is a
null pointer. Must be called once at startup, before calling
- putchar or any other output routine. Otherwise the default output
- driver will be used. */
-void output_init (char *name);
+ putchar or any other output routine. Returns 0 if NAME is not a
+ valid output driver name, otherwise 1 on success. */
+int output_init (char *name);
/* Deactivate the output driver. Must be called after the last time
putchar or any other output routine is called. */
@@ -58,3 +61,5 @@
void putchar (int chr);
void printf (const char *fmt, ...);
+
+#endif /* _OUTPUT_H */
Index: hurd-l4/laden/shutdown.h
diff -u hurd-l4/laden/shutdown.h:1.1 hurd-l4/laden/shutdown.h:1.2
--- hurd-l4/laden/shutdown.h:1.1 Sun Sep 7 16:56:46 2003
+++ hurd-l4/laden/shutdown.h Sun Sep 7 18:13:04 2003
@@ -18,6 +18,11 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
+#ifndef _SHUTDOWN_H
+#define _SHUTDOWN_H 1
+
+#include "output.h"
+
/* Every architecture must provide the following functions. */
@@ -36,3 +41,5 @@
/* End the program with a failure. This can halt or reset the
system. */
void shutdown (void);
+
+#endif /* _SHUTDOWN_H */
Index: hurd-l4/laden/string.c
diff -u hurd-l4/laden/string.c:1.1 hurd-l4/laden/string.c:1.2
--- hurd-l4/laden/string.c:1.1 Sat Jul 26 13:26:09 2003
+++ hurd-l4/laden/string.c Sun Sep 7 18:13:04 2003
@@ -18,6 +18,13 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "string.h"
+
+
int
strcmp (const char *s1, const char *s2)
{
Index: hurd-l4/laden/string.h
diff -u hurd-l4/laden/string.h:1.1 hurd-l4/laden/string.h:1.2
--- hurd-l4/laden/string.h:1.1 Sun Sep 7 16:04:25 2003
+++ hurd-l4/laden/string.h Sun Sep 7 18:13:04 2003
@@ -18,9 +18,13 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
-
+#ifndef _STRING_H
+#define _STRING_H 1
+
int strcmp (const char *s1, const char *s2);
void *memcpy (void *dest, const void *src, int n);
void *memset (void *s, int c, int n);
+
+#endif /* _STRING_H */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- hurd-l4/laden ia32-output.c ia32-shutdown.c lad...,
Marcus Brinkmann <=