[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
hurd-l4/wortel Makefile.am ia32-cmain.c output....
From: |
Marcus Brinkmann |
Subject: |
hurd-l4/wortel Makefile.am ia32-cmain.c output.... |
Date: |
Mon, 08 Sep 2003 10:40:38 -0400 |
CVSROOT: /cvsroot/hurd
Module name: hurd-l4
Branch:
Changes by: Marcus Brinkmann <address@hidden> 03/09/08 10:40:37
Modified files:
wortel : Makefile.am ia32-cmain.c output.c output.h
shutdown.c shutdown.h wortel.c wortel.h
Added files:
wortel : loader.c loader.h
Log message:
Integrate loader and upgrade other interfaces.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/wortel/loader.c?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/wortel/loader.h?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/wortel/Makefile.am.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/wortel/ia32-cmain.c.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/wortel/output.c.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/wortel/output.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/wortel/shutdown.c.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/wortel/shutdown.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/wortel/wortel.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/wortel/wortel.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
Patches:
Index: hurd-l4/wortel/Makefile.am
diff -u hurd-l4/wortel/Makefile.am:1.1 hurd-l4/wortel/Makefile.am:1.2
--- hurd-l4/wortel/Makefile.am:1.1 Sun Sep 7 21:00:18 2003
+++ hurd-l4/wortel/Makefile.am Mon Sep 8 10:40:37 2003
@@ -30,7 +30,7 @@
wortel_SOURCES = $(ARCH_SOURCES) string.h string.c \
output.h output.c output-none.c \
shutdown.h shutdown.c \
- elf.h \
+ elf.h loader.h loader.c \
wortel.h wortel.c
/* FIXME: Make linkbase configurable. */
Index: hurd-l4/wortel/ia32-cmain.c
diff -u hurd-l4/wortel/ia32-cmain.c:1.1 hurd-l4/wortel/ia32-cmain.c:1.2
--- hurd-l4/wortel/ia32-cmain.c:1.1 Sun Sep 7 21:00:18 2003
+++ hurd-l4/wortel/ia32-cmain.c Mon Sep 8 10:40:37 2003
@@ -115,7 +115,7 @@
argc = 1;
argv = alloca (sizeof (char *) * 2);
- argv[0] = PROGRAM_NAME;
+ argv[0] = program_name;
argv[1] = 0;
}
Index: hurd-l4/wortel/output.c
diff -u hurd-l4/wortel/output.c:1.1 hurd-l4/wortel/output.c:1.2
--- hurd-l4/wortel/output.c:1.1 Sun Sep 7 21:00:18 2003
+++ hurd-l4/wortel/output.c Mon Sep 8 10:40:37 2003
@@ -26,6 +26,10 @@
#include "output.h"
+
+/* True if debugging is enabled. */
+int output_debug;
+
/* The active output driver. */
static struct output_driver *output;
Index: hurd-l4/wortel/output.h
diff -u hurd-l4/wortel/output.h:1.1 hurd-l4/wortel/output.h:1.2
--- hurd-l4/wortel/output.h:1.1 Sun Sep 7 21:00:18 2003
+++ hurd-l4/wortel/output.h Mon Sep 8 10:40:37 2003
@@ -62,4 +62,10 @@
void printf (const char *fmt, ...);
+/* True if debug mode is enabled. */
+extern int output_debug;
+
+/* Print a debug message. */
+#define debug(...) do { if (output_debug) printf (__VA_ARGS__); } while (0)
+
#endif /* _OUTPUT_H */
Index: hurd-l4/wortel/shutdown.c
diff -u hurd-l4/wortel/shutdown.c:1.3 hurd-l4/wortel/shutdown.c:1.4
--- hurd-l4/wortel/shutdown.c:1.3 Mon Sep 8 07:22:57 2003
+++ hurd-l4/wortel/shutdown.c Mon Sep 8 10:40:37 2003
@@ -26,13 +26,13 @@
#include "shutdown.h"
-/* Time to sleep (in seconds) before reset. */
-
-#define SLEEP_TIME 10
/* Reset the machine at failure, instead halting it. */
int shutdown_reset;
+/* Time to sleep before reset. */
+#define SLEEP_TIME 10
+
void
halt (void)
@@ -46,7 +46,9 @@
{
if (shutdown_reset)
{
- l4_sleep (SLEEP_TIME);
+ l4_time_t timespec = l4_time_period (SLEEP_TIME * 1000UL * 1000UL);
+
+ l4_sleep (timespec);
reset ();
}
else
Index: hurd-l4/wortel/shutdown.h
diff -u hurd-l4/wortel/shutdown.h:1.2 hurd-l4/wortel/shutdown.h:1.3
--- hurd-l4/wortel/shutdown.h:1.2 Sun Sep 7 21:41:03 2003
+++ hurd-l4/wortel/shutdown.h Mon Sep 8 10:40:37 2003
@@ -29,18 +29,29 @@
/* Reset the machine. */
void reset (void);
+/* Halt the machine. */
+void halt (void);
+
/* The generic code defines these functions. */
/* Reset the machine at failure, instead halting it. */
extern int shutdown_reset;
-/* Halt the machine. */
-void halt (void);
-
/* End the program with a failure. This can halt or reset the
system. */
void shutdown (void);
+/* The program name. */
+extern char *program_name;
+
+/* Print an error message and fail. */
+#define panic(...) \
+ ({ \
+ printf ("%s: error: ", program_name); \
+ printf (__VA_ARGS__); \
+ putchar ('\n'); \
+ shutdown (); \
+ })
#endif /* _SHUTDOWN_H */
Index: hurd-l4/wortel/wortel.c
diff -u hurd-l4/wortel/wortel.c:1.2 hurd-l4/wortel/wortel.c:1.3
--- hurd-l4/wortel/wortel.c:1.2 Sun Sep 7 21:41:03 2003
+++ hurd-l4/wortel/wortel.c Mon Sep 8 10:40:37 2003
@@ -24,10 +24,31 @@
#include "wortel.h"
+/* The program name. */
+char *program_name = "wortel";
+
+
+/* Return the number of memory descriptors. */
+l4_word_t
+loader_get_num_memory_desc (void)
+{
+ return l4_num_memory_desc ();
+}
+
+
+/* Return the NRth memory descriptor. The first memory descriptor is
+ indexed by 0. */
+l4_memory_desc_t
+loader_get_memory_desc (l4_word_t nr)
+{
+ return l4_memory_desc (nr);
+}
+
+
/* True if debug mode is enabled. */
int debug;
-
+
static void
parse_args (int argc, char *argv[])
{
@@ -39,7 +60,7 @@
{
i++;
printf ("Usage %s [OPTION...]\n", argv[0]);
- printf ("Try `" PROGRAM_NAME " --help' for more information\n");
+ printf ("Try `%s --help' for more information\n", program_name);
shutdown ();
}
else if (!strcmp (argv[i], "--help"))
@@ -82,7 +103,7 @@
else if (!strcmp (argv[i], "--version"))
{
i++;
- printf (PROGRAM_NAME " " PACKAGE_VERSION "\n");
+ printf ("%s " PACKAGE_VERSION "\n", program_name);
shutdown ();
}
else if (!strcmp (argv[i], "-o") || !strcmp (argv[i], "--output"))
@@ -121,7 +142,7 @@
{
parse_args (argc, argv);
- debug (PROGRAM_NAME " " PACKAGE_VERSION "\n");
+ debug ("%s " PACKAGE_VERSION "\n", program_name);
while (1)
l4_yield ();
Index: hurd-l4/wortel/wortel.h
diff -u hurd-l4/wortel/wortel.h:1.2 hurd-l4/wortel/wortel.h:1.3
--- hurd-l4/wortel/wortel.h:1.2 Sun Sep 7 21:41:03 2003
+++ hurd-l4/wortel/wortel.h Mon Sep 8 10:40:37 2003
@@ -22,25 +22,12 @@
#include "string.h"
#include "output.h"
#include "shutdown.h"
+#include "loader.h"
-#define PROGRAM_NAME "wortel"
-#define BUG_ADDRESS "<address@hidden>"
-
-/* Print an error message and fail. */
-#define panic(...) \
- ({ \
- printf (PROGRAM_NAME ": error: "); \
- printf (__VA_ARGS__); \
- putchar ('\n'); \
- shutdown (); \
- })
-
-/* True if debug mode is enabled. */
-extern int debug;
-
-/* Print a debug message. */
-#define debug(...) do { if (debug) printf (__VA_ARGS__); } while (0)
+/* The program name. */
+extern char *program_name;
+#define BUG_ADDRESS "<address@hidden>"
int main (int argc, char *argv[]);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- hurd-l4/wortel Makefile.am ia32-cmain.c output....,
Marcus Brinkmann <=