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

Commit 425d3e3a authored by Hamad Kadmany's avatar Hamad Kadmany Committed by Steve Kondik
Browse files

system: core: Add uevent support for dvb devices

Broadcast applications expects dvb devices to exist
in specific location.

Change-Id: I521f2957147428b7812ca1fb8fb6c49f44cdb8d1
parent aa772364
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -819,6 +819,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);