Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3073ad70 authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru Committed by Android Git Automerger
Browse files

am 8c92ba19: merge from open-source master

Merge commit '8c92ba19'

* commit '8c92ba19': (21 commits)
  BUGFIX - ro.kernel.android.{qemud | ril} and ro.android.noril
  Allow an onrestart command to stop the current service
  added chdir/chroot commands to init for mount switching/pivoting
  Trivial implementation of init's import command.
  adb: Fix emulator support.
  Fix broken 'adb root' command.
  adb: Improved support for running adb over TCP/IP
  BUG 2033924: Add AdbWinUsbApi.dll to prebuilt for Windows SDK
  adb: Fix infinite loop in Linux host device discovery.
  adb: print better error message when there are insufficient permissions for a device.
  adb: update call to register_usb_transport in Mac and Windows builds.
  adb: On Linux, detect USB devices for which adb does not have permissions to communicate with.
  adb: Use correct language ID when retrieving USB serial number.
  adb: Remove adbd from simulator build.
  adb: add "adb reboot" command.
  get rid of utils/executablepath.h, which now lives in the simulator
  Allow adb to use ANDORID_SERIAL env variable to specify the device to talk to.
  Fix incorrect check for LOG_UEVENTS
  init.rc: Fixes typo: sytem -> system.
  completed implementation of "trigger" for init
  ...
parents 0645a5b7 8c92ba19
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -131,6 +131,18 @@ static void service_start_if_not_disabled(struct service *svc)
    }
}

int do_chdir(int nargs, char **args)
{
    chdir(args[1]);
    return 0;
}

int do_chroot(int nargs, char **args)
{
    chroot(args[1]);
    return 0;
}

int do_class_start(int nargs, char **args)
{
        /* Starting a class does not start services
@@ -206,7 +218,7 @@ int do_insmod(int nargs, char **args)

int do_import(int nargs, char **args)
{
    return -1;
    return parse_config_file(args[1]);
}

int do_mkdir(int nargs, char **args)
@@ -400,6 +412,8 @@ int do_restart(int nargs, char **args)

int do_trigger(int nargs, char **args)
{
    action_for_each_trigger(args[1], action_add_queue_tail);
    drain_action_queue();
    return 0;
}

+1 −1
Original line number Diff line number Diff line
@@ -307,7 +307,7 @@ static void make_device(const char *path, int block, int major, int minor)
    chown(path, uid, gid);
}

#ifdef LOG_UEVENTS
#if LOG_UEVENTS

static inline suseconds_t get_usecs(void)
{

init/init.c

100644 → 100755
+3 −4
Original line number Diff line number Diff line
@@ -65,8 +65,6 @@ static struct input_keychord *keychords = 0;
static int keychords_count = 0;
static int keychords_length = 0;

static void drain_action_queue(void);

static void notify_service_state(const char *name, const char *state)
{
    char pname[PROP_NAME_MAX];
@@ -391,12 +389,13 @@ static int wait_for_one_process(int block)
        }
    }

    svc->flags |= SVC_RESTARTING;

    /* Execute all onrestart commands for this service. */
    list_for_each(node, &svc->onrestart.commands) {
        cmd = node_to_item(node, struct command, clist);
        cmd->func(cmd->nargs, cmd->args);
    }
    svc->flags |= SVC_RESTARTING;
    notify_service_state(svc->name, "restarting");
    return 0;
}
@@ -667,7 +666,7 @@ static void get_hardware_name(void)
    }
}

static void drain_action_queue(void)
void drain_action_queue(void)
{
    struct listnode *node;
    struct command *cmd;
+1 −0
Original line number Diff line number Diff line
@@ -165,6 +165,7 @@ void service_stop(struct service *svc);
void service_start(struct service *svc, const char *dynamic_args);
void property_changed(const char *name, const char *value);

void drain_action_queue(void);
struct action *action_remove_queue_head(void);
void action_add_queue_tail(struct action *act);
void action_for_each_trigger(const char *trigger,
+4 −0
Original line number Diff line number Diff line

#ifndef KEYWORD
int do_chroot(int nargs, char **args);
int do_chdir(int nargs, char **args);
int do_class_start(int nargs, char **args);
int do_class_stop(int nargs, char **args);
int do_domainname(int nargs, char **args);
@@ -32,6 +34,8 @@ enum {
    K_UNKNOWN,
#endif
    KEYWORD(capability,  OPTION,  0, 0)
    KEYWORD(chdir,       COMMAND, 1, do_chdir)
    KEYWORD(chroot,      COMMAND, 1, do_chroot)
    KEYWORD(class,       OPTION,  0, 0)
    KEYWORD(class_start, COMMAND, 1, do_class_start)
    KEYWORD(class_stop,  COMMAND, 1, do_class_stop)
Loading