From 7c261f45da20f7a57c18eff202d2d9dc07804e30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 6 Sep 2019 17:13:43 +0200 Subject: [PATCH] qfile-unpacker: add option (-w) to wait for disk space before extracting Add -w MARGIN option to always leave at least MARGIN bytes of free space. QubesOS/qubes-issues#4791 --- qubes-rpc/qfile-unpacker.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qubes-rpc/qfile-unpacker.c b/qubes-rpc/qfile-unpacker.c index 268c9a4..aeff009 100644 --- a/qubes-rpc/qfile-unpacker.c +++ b/qubes-rpc/qfile-unpacker.c @@ -75,6 +75,12 @@ int main(int argc, char ** argv) for (i = 3; i < argc; i++) { if (strcmp(argv[i], "-v") == 0) set_verbose(1); + else if (strcmp(argv[i], "-w") == 0) + if (i+1 < argc && argv[i+1][0] != '-') { + set_wait_for_space(atoi(argv[i+1])); + i++; + } else + set_wait_for_space(1); else gui_fatal("Invalid option %s", argv[i]); }