Fastbootd: auto ssh server start
Change-Id: I3e9c53c3d834726c3747e9ee0665ed027f55b08c
This commit is contained in:
parent
bc849f1453
commit
27ea99fb99
4 changed files with 8 additions and 4 deletions
|
|
@ -31,6 +31,7 @@ void usb_init();
|
|||
void config_init();
|
||||
int transport_socket_init();
|
||||
int network_discovery_init();
|
||||
void ssh_server_start();
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
|
@ -77,6 +78,7 @@ int main(int argc, char **argv)
|
|||
usb_init();
|
||||
if (!transport_socket_init())
|
||||
exit(1);
|
||||
ssh_server_start();
|
||||
network_discovery_init();
|
||||
while (1) {
|
||||
sleep(1);
|
||||
|
|
|
|||
|
|
@ -154,9 +154,6 @@ int main(int argc, char *argv[]) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
fprintf(stderr, "entries %d, name %s\n", table->header->entries_count, (char *) table->header->signature);
|
||||
|
||||
|
||||
if (add_cmd)
|
||||
addGPT(table, new_partition, partition_guid, type_guid);
|
||||
if (del_cmd)
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ int service_start(const char *service_name)
|
|||
|
||||
property_get(service_name, property_value, "");
|
||||
if (strcmp("running", property_value) != 0) {
|
||||
D(INFO, "Starting MDNSD");
|
||||
D(INFO, "Starting %s", service_name);
|
||||
property_set("ctl.start", service_name);
|
||||
if (wait_for_property(service_name, "running", 5))
|
||||
result = -1;
|
||||
|
|
@ -254,3 +254,7 @@ int service_stop(const char *service_name)
|
|||
return result;
|
||||
}
|
||||
|
||||
int ssh_server_start()
|
||||
{
|
||||
return service_start("sshd");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ ssize_t bulk_read(int bulk_out, char *buf, size_t length);
|
|||
ssize_t bulk_write(int bulk_in, const char *buf, size_t length);
|
||||
int service_start(const char *service_name);
|
||||
int service_stop(const char *service_name);
|
||||
int ssh_server_start();
|
||||
|
||||
#define ROUND_TO_PAGE(address,pagesize) ((address + pagesize - 1) & (~(pagesize - 1)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue