This is something that had me stuck for days on an upcoming project. If
you’re experiencing bizarre results with nodes you’ve created yourself, make
sure you’ve sprinkled S_IFBLK
into your mode_t
bitfield. Your node won’t
function as one without it. See Busybox’s mdev.c
:
int major, minor, type; int mode = 0660; ... type = path[5]=='c' ? S_IFCHR : S_IFBLK; ... mknod(device_name, mode | type, makedev(major, minor))