block-qcow2: keep backing file format in a qcow2 extension (Uri Lublin)
[qemu-kvm/fedora.git] / hxtool
blob8dbeb76f671470351d759bd328e809942f27d3e8
1 #!/bin/sh
3 hxtoh()
5 flag=1
6 while read str; do
7 case $str in
8 HXCOMM*)
9 ;;
10 STEXI*|ETEXI*) flag=$(($flag^1))
13 test $flag -eq 1 && echo $str
15 esac
16 done
19 hxtotexi()
21 flag=0
22 while read str; do
23 case "$str" in
24 HXCOMM*)
26 STEXI*|ETEXI*) flag=$(($flag^1))
28 DEFHEADING*)
29 echo $(expr "$str" : "DEFHEADING(\(.*\))")
32 test $flag -eq 1 && echo $str
34 esac
35 done
38 case "$1" in
39 "-h") hxtoh ;;
40 "-t") hxtotexi ;;
41 *) exit 1 ;;
42 esac
44 exit 0