Fastbootd: auto ssh server start

Change-Id: I3e9c53c3d834726c3747e9ee0665ed027f55b08c
This commit is contained in:
Szymon Starzycki 2013-09-18 16:12:43 -07:00 committed by Colin Cross
parent bc849f1453
commit 27ea99fb99
4 changed files with 8 additions and 4 deletions

View file

@ -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);

View file

@ -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)

View file

@ -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");
}

View file

@ -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)))