if (ifd[DEV_PWRBTN] == -1) printf("Warning: couldn't find pwrbutton device\n");
if (ifd[DEV_KEYPAD] == -1) printf("Warning: couldn't find keypad device\n");
- if (ifd[DEV_BUTTONS] == -1) printf("Warning: couldn't find button device\n");
if (ifd[DEV_TS] == -1) printf("Warning: couldn't find touchscreen device\n");
if (ifd[DEV_LNUB] == -1) printf("Warning: couldn't find nub1 device\n");
if (ifd[DEV_RNUB] == -1) printf("Warning: couldn't find nub2 device\n");
+ if (ifd[DEV_BUTTONS] == -1) {
+ printf("Error: couldn't find button device\n");
+ /* buttons needed to exit this, so bail out */
+ retval = -1;
+ goto end;
+ }
#ifdef VALIDATION
int early_leave_attempt = 0;
nub0mode=`cat /proc/pandora/nub0/mode`
nub1mode=`cat /proc/pandora/nub1/mode`
-echo absolute > /proc/pandora/nub0/mode
-echo absolute > /proc/pandora/nub1/mode
+/usr/pandora/scripts/op_nubchange.sh absolute absolute
fbset -depth 16
op_runfbapp op_test_inputs_bin
fbset -depth $olddepth
-echo "$nub0mode" > /proc/pandora/nub0/mode
-echo "$nub1mode" > /proc/pandora/nub1/mode
+/usr/pandora/scripts/op_nubchange.sh $nub0mode $nub1mode