File: create_dev

package info (click to toggle)
bluez-utils 2.15-1.1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,748 kB
  • ctags: 1,827
  • sloc: ansic: 14,952; sh: 912; yacc: 359; lex: 270; makefile: 168; python: 114
file content (29 lines) | stat: -rwxr-xr-x 438 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
#
#  Create Bluetooth devices in /dev
#
#  $Id: create_dev,v 1.1 2003/01/15 13:08:16 holtmann Exp $
#

VHCI_MAJOR=10
VHCI_MINOR=250

RFCOMM_MAJOR=216

#
# Create device for VHCI
#
if [ ! -c /dev/vhci ]; then
	mknod /dev/vhci c ${VHCI_MAJOR} ${VHCI_MINOR}
	chmod 664 /dev/vhci
fi

#
# Create devices for RFCOMM
#
for i in `seq 0 255`
do
	if [ ! -c /dev/rfcomm$i ]; then
		mknod -m 666 /dev/rfcomm$i c ${RFCOMM_MAJOR} $i
	fi
done