-1

This is the code snippet responsible for creating the device:

master_dev = device_create(dev_cl, NULL, MKDEV(major, minor), NULL, "synchmess");

My udev rule is the following:

KERNEL=="synchmess", NAME="/synch/synchmess", MODE="0444"

From my understanding, this rule should match against the device name given by the kernel module (synchmess) and create the /dev subdirectory "synch". However, the synchmess device shows under /dev with the correct permissions, but i can't seem to figure out how to create the directory.

GiuDaquan
  • 13
  • 3
  • any different result on your system without a leading `/`? eg: `NAME="synch/synchmess"` – Milag Sep 21 '20 at 11:46

1 Answers1

0

Try "synch!synchmess" as the last arg to dev_create(); reference:
lists.kernelnewbies.org

Also see this item on Stack Overflow
udev rules, mkdir

Milag
  • 1,793
  • 2
  • 9
  • 8
  • Thank you very much for the tip, it turns out you can use the NAME key to change network interfaces names only. Removing the NAME key from the udev rule and following your advice solved the issue for me. – GiuDaquan Sep 22 '20 at 08:27