Import QEMU upstream snapshot d2e570c
Upstream: https://gitlab.com/qemu-project/qemu.git Upstream-Commit: d2e570cc0f97b936902a5b1b86b73c0f5998b475
This commit is contained in:
commit
cf256aa081
11315 files changed
+3598369
No files matched your search
Executable
+57
@@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
|
||||
print_if_not_rst()
|
||||
{
|
||||
test $in_rst -eq 0 && printf "%s\n" "$str"
|
||||
}
|
||||
|
||||
hxtoh()
|
||||
{
|
||||
in_rst=0
|
||||
# .name for HMP
|
||||
seen_name=0
|
||||
while read -r str; do
|
||||
case $str in
|
||||
HXCOMM*)
|
||||
;;
|
||||
SRST*)
|
||||
if [ $in_rst -eq 1 ]
|
||||
then
|
||||
echo "Error: SRST inside another RST" >&2
|
||||
exit 1
|
||||
fi
|
||||
# consume the name
|
||||
seen_name=0
|
||||
in_rst=1
|
||||
;;
|
||||
ERST*)
|
||||
if [ $in_rst -eq 0 ]
|
||||
then
|
||||
echo "Error: ERST already outside RST" >&2
|
||||
exit 1
|
||||
fi
|
||||
in_rst=0
|
||||
;;
|
||||
# Note the space at the start - we need to exclude something.name
|
||||
( .name*)
|
||||
if [ $seen_name -eq 1 ]
|
||||
then
|
||||
echo "Error: Seen another .name, maybe missing docs?" >&2
|
||||
exit 1
|
||||
fi
|
||||
seen_name=1
|
||||
print_if_not_rst
|
||||
;;
|
||||
*)
|
||||
print_if_not_rst
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
"-h") hxtoh ;;
|
||||
*) exit 1 ;;
|
||||
esac < "$2"
|
||||
|
||||
exit 0
|
||||
Reference in new issue
Block a user