Merge branch 'main' into update-shasum

This commit is contained in:
Hannes Mehnert 2023-07-05 16:59:38 +02:00 committed by GitHub
commit 81a87fd526
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 17 deletions

View File

@ -5,5 +5,5 @@ docker build -t qubes-mirage-firewall .
echo Building Firewall...
docker run --rm -i -v `pwd`:/tmp/orb-build qubes-mirage-firewall
echo "SHA2 of build: $(sha256sum ./dist/qubes-firewall.xen)"
echo "SHA2 last known: 4a3cd3f555f39c47b9675fd08425eee968a6484cb38aa19fb94f4c96844c2ae6"
echo "SHA2 last known: d9f7827e2f2c8150ac97a4d348a29f5ee0810a455dbab9233490fff97470f7b8"
echo "(hashes should match for released versions)"

View File

@ -27,19 +27,8 @@ let meminfo stats =
SwapTotal: 0 kB\n\
SwapFree: 0 kB\n" (mem_total / 1024) (mem_free / 1024)
let report_mem_usage stats =
Lwt.async (fun () ->
let open Xen_os in
Xs.make () >>= fun xs ->
Xs.immediate xs (fun h ->
Xs.write h "memory/meminfo" (meminfo stats)
)
)
let init () =
Gc.full_major ();
let stats = Xen_os.Memory.quick_stat () in
report_mem_usage stats
Gc.full_major ()
let status () =
let stats = Xen_os.Memory.quick_stat () in
@ -48,8 +37,6 @@ let status () =
Gc.full_major ();
Xen_os.Memory.trim ();
let stats = Xen_os.Memory.quick_stat () in
if fraction_free stats < 0.6 then begin
report_mem_usage stats;
`Memory_critical
end else `Ok
if fraction_free stats < 0.6 then `Memory_critical
else `Ok
)