Create sound device nodes in /dev/snd/.

This commit is contained in:
Xiaopeng Yang 2008-11-25 16:20:07 -08:00 committed by Brian Swetland
parent 7186a800c0
commit 5bb44c8ea2
1 changed files with 4 additions and 0 deletions

View File

@ -127,6 +127,7 @@ static struct perms_ devperms[] = {
{ "/dev/qmi1", 0640, AID_RADIO, AID_RADIO, 0 },
{ "/dev/qmi2", 0640, AID_RADIO, AID_RADIO, 0 },
{ "/dev/htc-acoustic", 0640, AID_RADIO, AID_RADIO, 0 },
{ "/dev/snd/", 0664, AID_SYSTEM, AID_AUDIO, 1 },
{ NULL, 0, 0, 0, 0 },
};
@ -383,6 +384,9 @@ static void handle_device_event(struct uevent *uevent)
} else if(!strncmp(uevent->path, "/class/mtd/", 11)) {
base = "/dev/mtd/";
mkdir(base, 0755);
} else if(!strncmp(uevent->subsystem, "sound", 5)) {
base = "/dev/snd/";
mkdir(base, 0755);
} else if(!strncmp(uevent->path, "/class/misc/", 12) &&
!strncmp(name, "log_", 4)) {
base = "/dev/log/";