diff options
author | Stuart Bennett <sb476@cam.ac.uk> | 2007-11-24 01:54:35 +0000 |
---|---|---|
committer | Stuart Bennett <sb476@cam.ac.uk> | 2007-11-24 01:54:51 +0000 |
commit | 1c00f0253bf9d39789c15fa368d294078c2c5cf7 (patch) | |
tree | 1cb6c5ce744fa88847fda5cc638a616a1a6b63f5 | |
parent | c02f1b8467800c9bf7b7ebd0e84576bb631d14ad (diff) |
A script to allow posting and mode restoration, for fbcon use
-rwxr-xr-x | postandrestore.bash | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/postandrestore.bash b/postandrestore.bash new file mode 100755 index 0000000..c3810a6 --- /dev/null +++ b/postandrestore.bash @@ -0,0 +1,29 @@ +#!/bin/bash +# +# postandrestore.bash +# +# for tracing a POST call and restoring the previous graphics mode +# (useful when using an fbcon) + +VBTT="`dirname "$0"`/vbtracetool" + +TEMP=`getopt -o dln -n 'postandrestore.bash' -- "$@"` + +if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi + +eval set -- "$TEMP" + +while true ; do + case "$1" in + -d) debug=$1 ; shift ;; + -l) log=$1 ; shift ;; + -n) nvbios=$1 ; shift ;; + --) shift ; break ;; + *) echo "Option parsing error!" ; exit 1 ;; + esac +done +for arg do echo 'Invalid argument '"\`$arg'" ; exit 1 ; done + +mode=$($VBTT $nvbios -g | tail -1 | sed 's/^.*(//g' | sed 's/)//g') +$VBTT $debug $log $nvbios -p +$VBTT $nvbios -s $mode > /dev/null |