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

Commit c0d8fb58 authored by Mike Lockwood's avatar Mike Lockwood
Browse files

DO NOT MERGE resolved conflicts for merge of e95aad61 to kraken



this change is already in master

Change-Id: Ica43eae28b50d89d50217851aff7e62978abfa27
Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parents 509f7399 e95aad61
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@
#define AID_SDCARD_RW     1015  /* external storage write access */
#define AID_VPN           1016  /* vpn system */
#define AID_KEYSTORE      1017  /* keystore subsystem */
#define AID_USB           1018  /* USB devices */

#define AID_SHELL         2000  /* adb and debug shell user */
#define AID_CACHE         2001  /* cache access */
@@ -100,6 +101,7 @@ static struct android_id_info android_ids[] = {
    { "sdcard_rw", AID_SDCARD_RW, },
    { "vpn",       AID_VPN, },
    { "keystore",  AID_KEYSTORE, },
    { "usb",       AID_USB, },
    { "inet",      AID_INET, },
    { "net_raw",   AID_NET_RAW, },
    { "net_admin", AID_NET_ADMIN, },
+1 −0
Original line number Diff line number Diff line
@@ -258,6 +258,7 @@ static struct {
    const char *name;
    unsigned flag;
} mount_flags[] = {
    { "move",       MS_MOVE },
    { "noatime",    MS_NOATIME },
    { "nosuid",     MS_NOSUID },
    { "nodev",      MS_NODEV },
+23 −2
Original line number Diff line number Diff line
@@ -327,6 +327,7 @@ err:
static void handle_device_event(struct uevent *uevent)
{
    char devpath[96];
    int devpath_ready = 0;
    char *base, *name;
    char **links = NULL;
    int block;
@@ -356,7 +357,26 @@ static void handle_device_event(struct uevent *uevent)
    } else {
        block = 0;
            /* this should probably be configurable somehow */
        if(!strncmp(uevent->subsystem, "graphics", 8)) {
        if (!strncmp(uevent->subsystem, "usb", 3)) {
            if (!strcmp(uevent->subsystem, "usb")) {
                /* This imitates the file system that would be created
                 * if we were using devfs instead.
                 * Minors are broken up into groups of 128, starting at "001"
                 */
                int bus_id = uevent->minor / 128 + 1;
                int device_id = uevent->minor % 128 + 1;
                /* build directories */
                mkdir("/dev/bus", 0755);
                mkdir("/dev/bus/usb", 0755);
                snprintf(devpath, sizeof(devpath), "/dev/bus/usb/%03d", bus_id);
                mkdir(devpath, 0755);
                snprintf(devpath, sizeof(devpath), "/dev/bus/usb/%03d/%03d", bus_id, device_id);
                devpath_ready = 1;
            } else {
                /* ignore other USB events */
                return;
            }
        } else if (!strncmp(uevent->subsystem, "graphics", 8)) {
            base = "/dev/graphics/";
            mkdir(base, 0755);
        } else if (!strncmp(uevent->subsystem, "oncrpc", 6)) {
@@ -386,6 +406,7 @@ static void handle_device_event(struct uevent *uevent)
            base = "/dev/";
    }

    if (!devpath_ready)
        snprintf(devpath, sizeof(devpath), "%s%s", base, name);

    if(!strcmp(uevent->action, "add")) {
+1 −0
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@
/dev/qmi0                 0640   radio      radio
/dev/qmi1                 0640   radio      radio
/dev/qmi2                 0640   radio      radio
/dev/bus/usb/*            0660   root       usb

# CDMA radio interface MUX
/dev/ts0710mux*           0640   radio      radio