forked from koush/android_system_core
-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- stop + start - for the lazy. Change-Id: Ie0ef0e27f5b7819a5575ece6b82c5813f4e38420
- Loading branch information
1 parent
00b1b8d
commit be285f5
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ OUR_TOOLS := \ | |
newfs_msdos \ | ||
ps \ | ||
prlimit \ | ||
restart \ | ||
sendevent \ | ||
start \ | ||
stop \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include <string.h> | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
|
||
#include <cutils/properties.h> | ||
|
||
int restart_main(int argc, char *argv[]) | ||
{ | ||
char buf[1024]; | ||
|
||
if(argc > 1) { | ||
property_set("ctl.stop", argv[1]); | ||
property_set("ctl.start", argv[1]); | ||
} else { | ||
/* defaults to stopping and starting the common services */ | ||
property_set("ctl.stop", "zygote_secondary"); | ||
property_set("ctl.stop", "zygote"); | ||
property_set("ctl.stop", "surfaceflinger"); | ||
property_set("ctl.stop", "netd"); | ||
property_set("ctl.start", "netd"); | ||
property_set("ctl.start", "surfaceflinger"); | ||
property_set("ctl.start", "zygote"); | ||
property_set("ctl.start", "zygote_secondary"); | ||
} | ||
|
||
return 0; | ||
} |