| Rev | Line | |
|---|
| [9] | 1 | /* reboot.c - Systemcall interface to mm/signal.c::do_reboot()
|
|---|
| 2 |
|
|---|
| 3 | author: Edvard Tuinder v892231@si.hhs.NL
|
|---|
| 4 | */
|
|---|
| 5 |
|
|---|
| 6 | #include <lib.h>
|
|---|
| 7 | #define reboot _reboot
|
|---|
| 8 | #include <unistd.h>
|
|---|
| 9 | #include <stdarg.h>
|
|---|
| 10 |
|
|---|
| 11 | int reboot(int how, ...)
|
|---|
| 12 | {
|
|---|
| 13 | message m;
|
|---|
| 14 | va_list ap;
|
|---|
| 15 |
|
|---|
| 16 | va_start(ap, how);
|
|---|
| 17 | if ((m.m1_i1 = how) == RBT_MONITOR) {
|
|---|
| 18 | m.m1_p1 = va_arg(ap, char *);
|
|---|
| 19 | m.m1_i2 = va_arg(ap, size_t);
|
|---|
| 20 | }
|
|---|
| 21 | va_end(ap);
|
|---|
| 22 |
|
|---|
| 23 | return _syscall(MM, REBOOT, &m);
|
|---|
| 24 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.