projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
upgrade the ixp4xx ethernet driver to v0.3.1, split the Gateway 7001 support to two...
[openwrt.git]
/
package
/
mtd
/
src
/
mtd.c
diff --git
a/package/mtd/src/mtd.c
b/package/mtd/src/mtd.c
index
f5acb1e
..
7d1e360
100644
(file)
--- a/
package/mtd/src/mtd.c
+++ b/
package/mtd/src/mtd.c
@@
-28,19
+28,22
@@
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
+#include <sys/ioctl.h>
+#include <sys/syscall.h>
#include <fcntl.h>
#include <errno.h>
#include <error.h>
#include <time.h>
#include <fcntl.h>
#include <errno.h>
#include <error.h>
#include <time.h>
+#include <string.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/reboot.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/reboot.h>
-#include <
string
.h>
+#include <
linux/reboot
.h>
-#include
<linux/mtd/mtd.h>
+#include
"mtd.h"
#define TRX_MAGIC 0x30524448 /* "HDR0" */
#define BUFSIZE (16 * 1024)
#define TRX_MAGIC 0x30524448 /* "HDR0" */
#define BUFSIZE (16 * 1024)
@@
-458,8
+461,9
@@
int main (int argc, char **argv)
sync();
sync();
- if (boot)
- kill(1, 15); // send SIGTERM to init for reboot
-
+ if (boot) {
+ fflush(stdout);
+ syscall(SYS_reboot,LINUX_REBOOT_MAGIC1,LINUX_REBOOT_MAGIC2,LINUX_REBOOT_CMD_RESTART,NULL);
+ }
return 0;
}
return 0;
}
This page took
0.022672 seconds
and
4
git commands to generate.