import cinit from unix.schottelius.org
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
parent
3729fc68eb
commit
423ba10303
13396 changed files with 269468 additions and 0 deletions
21
software/cinit/browse_source/cinit-0.3pre6/util/msg_reboot.c
Normal file
21
software/cinit/browse_source/cinit-0.3pre6/util/msg_reboot.c
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* (c) 2005 Nico Schottelius (nico-linux at schottelius.org)
|
||||
* reboot/halt/poweroff/rescue
|
||||
* part of cinit
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "cinit.h"
|
||||
|
||||
/* we trust the caller */
|
||||
int msg_reboot(char cmd)
|
||||
{
|
||||
if(!begin_msg(cmd)) return 0;
|
||||
close(sock);
|
||||
return 1;
|
||||
}
|
||||
/* clean for cinit-0.2 */
|
||||
Loading…
Add table
Add a link
Reference in a new issue