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
This commit is contained in:
parent
13eef467bf
commit
7c261f45da
@ -75,6 +75,12 @@ int main(int argc, char ** argv)
|
|||||||
for (i = 3; i < argc; i++) {
|
for (i = 3; i < argc; i++) {
|
||||||
if (strcmp(argv[i], "-v") == 0)
|
if (strcmp(argv[i], "-v") == 0)
|
||||||
set_verbose(1);
|
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
|
else
|
||||||
gui_fatal("Invalid option %s", argv[i]);
|
gui_fatal("Invalid option %s", argv[i]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user