Use major device number from the device node file if it exists
authorFedin Pavel <p.fedin@samsung.com>
Wed, 13 Jun 2012 06:46:45 +0000 (10:46 +0400)
committerNikita Kalyazin <n.kalyazin@samsung.com>
Wed, 13 Jun 2012 06:46:45 +0000 (10:46 +0400)
driver/swap_driver.sh

index a28c042..16ceeab 100755 (executable)
@@ -50,6 +50,9 @@ if [ ! -c /dev/${DEVICE_FILE} ] ; then
            exit
        fi
        chmod a+r /dev/${DEVICE_FILE}
+else
+       # stat is better, but DTV doesn't have stat
+       DEFAULT_MAJOR=`ls -l /dev/swap_drv | awk '{sub(/,/,"",$5); print $5}'`
 fi
 
 # load driver module