Home | History | Annotate | Download | only in init

Lines Matching refs:uevent

43 struct uevent {
339 static void parse_event(const char *msg, struct uevent *uevent)
341 uevent->action = "";
342 uevent->path = "";
343 uevent->subsystem = "";
344 uevent->firmware = "";
345 uevent->major = -1;
346 uevent->minor = -1;
352 uevent->action = msg;
355 uevent->path = msg;
358 uevent->subsystem = msg;
361 uevent->firmware = msg;
364 uevent->major = atoi(msg);
367 uevent->minor = atoi(msg);
376 uevent->action, uevent->path, uevent->subsystem,
377 uevent->firmware, uevent->major, uevent->minor);
380 static void handle_device_event(struct uevent *uevent)
387 if((uevent->major < 0) || (uevent->minor < 0))
391 name = strrchr(uevent->path, '/');
401 if(!strncmp(uevent->subsystem, "block", 5)) {
408 if(!strncmp(uevent->subsystem, "graphics", 8)) {
411 } else if (!strncmp(uevent->subsystem, "oncrpc", 6)) {
414 } else if (!strncmp(uevent->subsystem, "adsp", 4)) {
417 } else if (!strncmp(uevent->subsystem, "msm_camera", 10)) {
420 } else if(!strncmp(uevent->subsystem, "input", 5)) {
423 } else if(!strncmp(uevent->subsystem, "mtd", 3)) {
426 } else if(!strncmp(uevent->subsystem, "sound", 5)) {
429 } else if(!strncmp(uevent->subsystem, "misc", 4) &&
440 if(!strcmp(uevent->action, "add")) {
441 make_device(devpath, block, uevent->major, uevent->minor);
445 if(!strcmp(uevent->action, "remove")) {
497 uevent *uevent)
503 uevent->path, uevent->firmware);
505 l = asprintf(&root, SYSFS_PREFIX"%s/", uevent->path);
517 l = asprintf(&file, FIRMWARE_DIR"/%s", uevent->firmware);
553 static void handle_firmware_event(struct uevent *uevent)
557 if(strcmp(uevent->subsystem, "firmware"))
560 if(strcmp(uevent->action, "add"))
566 process_firmware_event(uevent);
578 struct uevent uevent;
586 parse_event(msg, &uevent);
588 handle_device_event(&uevent);
589 handle_firmware_event(&uevent);
593 /* Coldboot walks parts of the /sys tree and pokes the uevent files
598 ** we poke another uevent file to make sure we don't overrun the
609 fd = openat(dfd, "uevent", O_WRONLY);