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

Commit ecfbe4c3 authored by Hamad Kadmany's avatar Hamad Kadmany Committed by Gerrit - the friendly Code Review server
Browse files

system: core: Add uevent support for dvb devices

Change-Id: I9a31183014cc370a2d948dbd1d6a36a6e89b4c13
parent 7c93b040
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -731,6 +731,27 @@ static void handle_generic_device_event(struct uevent *uevent)
         base = "/dev/log/";
         make_dir(base, 0755);
         name += 4;
     } else if (!strncmp(uevent->subsystem, "dvb", 3)) {
         /* This imitates the file system that would be created
          * if we were using devfs instead to preserve backward compatibility
          * for users of dvb devices
          */
         int adapter_id;
         char dev_name[20] = {0};

         sscanf(name, "dvb%d.%s", &adapter_id, dev_name);

         /* build dvb directory */
         base = "/dev/dvb";
         mkdir(base, 0755);

         /* build adapter directory */
         snprintf(devpath, sizeof(devpath), "/dev/dvb/adapter%d", adapter_id);
         mkdir(devpath, 0755);

         /* build actual device directory */
         snprintf(devpath, sizeof(devpath), "/dev/dvb/adapter%d/%s",
                  adapter_id, dev_name);
     } else
         base = "/dev/";
     links = get_character_device_symlinks(uevent);