equal
deleted
inserted
replaced
184 # remove stale device nodes |
184 # remove stale device nodes |
185 rm -f /dev/${CDEV}* |
185 rm -f /dev/${CDEV}* |
186 |
186 |
187 # get dynamic major number |
187 # get dynamic major number |
188 MAJOR=$(awk "\$2==\"EtherCAT\" {print \$1}" /proc/devices) |
188 MAJOR=$(awk "\$2==\"EtherCAT\" {print \$1}" /proc/devices) |
|
189 if [ -z "${MAJOR}" ]; then |
|
190 echo "Failed to get device major number!" |
|
191 ${RMMOD} ec_master |
|
192 exit_fail |
|
193 fi |
189 |
194 |
190 # create character devices |
195 # create character devices |
191 for i in ${MASTER_INDICES}; do |
196 for i in ${MASTER_INDICES}; do |
192 mknod /dev/${CDEV}${i} c ${MAJOR} ${i} |
197 mknod /dev/${CDEV}${i} c ${MAJOR} ${i} |
193 done |
198 done |