Skip to content
Snippets Groups Projects
Verified Commit 57f1947b authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Better status management

parent f7a8eae6
No related branches found
No related tags found
No related merge requests found
......@@ -171,10 +171,23 @@ qemu-system-x86_64 \
-nographic \
-vga none \
-drive file="build/${uuid}.bin",format=raw
status="$(("$?" / 2))"
status="$?"
echo
echo "## redoxer (${status}) ##"
cat "build/${uuid}.log"
exit "${status}"
case "${status}" in
51)
echo "## redoxer (success) ##"
cat "build/${uuid}.log"
exit 0
;;
53)
echo "## redoxer (failure) ##"
cat "build/${uuid}.log"
exit 1
;;
*)
echo "## redoxer (failure, qemu exit code ${status}) ##"
cat "build/${uuid}.log"
exit 2
;;
esac
......@@ -143,11 +143,12 @@ pub fn main() {
Ok(()) => {
// Exit with success using qemu device
Pio::<u16>::new(0x604).write(0x2000);
Pio::<u8>::new(0x501).write(51 / 2);
},
Err(err) => {
eprintln!("redoxerd: {}", err);
// Exit with error using qemu device
Pio::<u8>::new(0x501).write(1);
Pio::<u8>::new(0x501).write(53 / 2);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment