summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Baptiste Queru2008-12-19 10:15:15 -0600
committerJean-Baptiste Queru2008-12-19 10:15:15 -0600
commit77d0c65b950570edd5241a8f2ebecfc3acbc5135 (patch)
tree8e3d3e2ca15d3bd038de6e22e1f00f31aad1406f /init/devices.c
parent829dd45fe9556dac5996969c30b90f1be6c47c47 (diff)
parent35237d135807af84bf9b0e5b8d7f8633e58db6f5 (diff)
downloadplatform-system-core-77d0c65b950570edd5241a8f2ebecfc3acbc5135.tar.gz
platform-system-core-77d0c65b950570edd5241a8f2ebecfc3acbc5135.tar.xz
platform-system-core-77d0c65b950570edd5241a8f2ebecfc3acbc5135.zip
Merge commit 'remotes/korg/cupcake'
Conflicts: init/devices.c logwrapper/logwrapper.c mountd/AutoMount.c
Diffstat (limited to 'init/devices.c')
-rw-r--r--init/devices.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/init/devices.c b/init/devices.c
index 35cd30db4..3cb1cb821 100644
--- a/init/devices.c
+++ b/init/devices.c
@@ -98,9 +98,12 @@ static struct perms_ devperms[] = {
98 /* these should not be world writable */ 98 /* these should not be world writable */
99 { "/dev/android_adb", 0660, AID_ADB, AID_ADB, 0 }, 99 { "/dev/android_adb", 0660, AID_ADB, AID_ADB, 0 },
100 { "/dev/android_adb_enable", 0660, AID_ADB, AID_ADB, 0 }, 100 { "/dev/android_adb_enable", 0660, AID_ADB, AID_ADB, 0 },
101 { "/dev/ttyMSM0", 0660, AID_BLUETOOTH, AID_BLUETOOTH, 0 }, 101 /* TODO: remove legacy ttyMSM0 */
102 { "/dev/ttyMSM0", 0600, AID_BLUETOOTH, AID_BLUETOOTH, 0 },
103 { "/dev/ttyHS0", 0600, AID_BLUETOOTH, AID_BLUETOOTH, 0 },
104 { "/dev/uinput", 0600, AID_BLUETOOTH, AID_BLUETOOTH, 0 },
102 { "/dev/alarm", 0664, AID_SYSTEM, AID_RADIO, 0 }, 105 { "/dev/alarm", 0664, AID_SYSTEM, AID_RADIO, 0 },
103 { "/dev/tty0", 0666, AID_ROOT, AID_SYSTEM, 0 }, 106 { "/dev/tty0", 0660, AID_ROOT, AID_SYSTEM, 0 },
104 { "/dev/graphics/", 0660, AID_ROOT, AID_GRAPHICS, 1 }, 107 { "/dev/graphics/", 0660, AID_ROOT, AID_GRAPHICS, 1 },
105 { "/dev/hw3d", 0660, AID_SYSTEM, AID_GRAPHICS, 0 }, 108 { "/dev/hw3d", 0660, AID_SYSTEM, AID_GRAPHICS, 0 },
106 { "/dev/input/", 0660, AID_ROOT, AID_INPUT, 1 }, 109 { "/dev/input/", 0660, AID_ROOT, AID_INPUT, 1 },
@@ -362,32 +365,32 @@ static void handle_device_event(struct uevent *uevent)
362 return; 365 return;
363 366
364 /* are we block or char? where should we live? */ 367 /* are we block or char? where should we live? */
365 if(!strncmp(uevent->path, "/block", 6)) { 368 if(!strncmp(uevent->subsystem, "block", 5)) {
366 block = 1; 369 block = 1;
367 base = "/dev/block/"; 370 base = "/dev/block/";
368 mkdir(base, 0755); 371 mkdir(base, 0755);
369 } else { 372 } else {
370 block = 0; 373 block = 0;
371 /* this should probably be configurable somehow */ 374 /* this should probably be configurable somehow */
372 if(!strncmp(uevent->path, "/class/graphics/", 16)) { 375 if(!strncmp(uevent->subsystem, "graphics", 8)) {
373 base = "/dev/graphics/"; 376 base = "/dev/graphics/";
374 mkdir(base, 0755); 377 mkdir(base, 0755);
375 } else if (!strncmp(uevent->path, "/class/oncrpc/", 14)) { 378 } else if (!strncmp(uevent->subsystem, "oncrpc", 6)) {
376 base = "/dev/oncrpc/"; 379 base = "/dev/oncrpc/";
377 mkdir(base, 0755); 380 mkdir(base, 0755);
378 } else if (!strncmp(uevent->path, "/class/adsp/", 12)) { 381 } else if (!strncmp(uevent->subsystem, "adsp", 4)) {
379 base = "/dev/adsp/"; 382 base = "/dev/adsp/";
380 mkdir(base, 0755); 383 mkdir(base, 0755);
381 } else if(!strncmp(uevent->path, "/class/input/", 13)) { 384 } else if(!strncmp(uevent->subsystem, "input", 5)) {
382 base = "/dev/input/"; 385 base = "/dev/input/";
383 mkdir(base, 0755); 386 mkdir(base, 0755);
384 } else if(!strncmp(uevent->path, "/class/mtd/", 11)) { 387 } else if(!strncmp(uevent->subsystem, "mtd", 3)) {
385 base = "/dev/mtd/"; 388 base = "/dev/mtd/";
386 mkdir(base, 0755); 389 mkdir(base, 0755);
387 } else if(!strncmp(uevent->subsystem, "sound", 5)) { 390 } else if(!strncmp(uevent->subsystem, "sound", 5)) {
388 base = "/dev/snd/"; 391 base = "/dev/snd/";
389 mkdir(base, 0755); 392 mkdir(base, 0755);
390 } else if(!strncmp(uevent->path, "/class/misc/", 12) && 393 } else if(!strncmp(uevent->subsystem, "misc", 4) &&
391 !strncmp(name, "log_", 4)) { 394 !strncmp(name, "log_", 4)) {
392 base = "/dev/log/"; 395 base = "/dev/log/";
393 mkdir(base, 0755); 396 mkdir(base, 0755);