MAKEDEV 514 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. function makedev () {
  3. for dev in 0 1 2 3; do
  4. echo "/dev/$1$dev: char 81 $[ $2 + $dev ]"
  5. rm -f /dev/$1$dev
  6. mknod /dev/$1$dev c 81 $[ $2 + $dev ]
  7. chmod 666 /dev/$1$dev
  8. done
  9. # symlink for default device
  10. rm -f /dev/$1
  11. ln -s /dev/${1}0 /dev/$1
  12. }
  13. # see http://linux.bytesex.org/v4l2/API.html
  14. echo "*** new device names ***"
  15. makedev video 0
  16. makedev radio 64
  17. makedev vbi 224
  18. #echo "*** old device names (for compatibility only) ***"
  19. #makedev bttv 0
  20. #makedev bttv-fm 64
  21. #makedev bttv-vbi 224