tar2qfile: ignore EDQUOT error from dom0
dom0 will use quota enforcement to extract only backup header, so this is normal situation in this tool.
This commit is contained in:
parent
af03425187
commit
1bd16d981c
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
unsigned long crc32_sum;
|
unsigned long crc32_sum;
|
||||||
int ignore_symlinks = 0;
|
int ignore_symlinks = 0;
|
||||||
|
int ignore_quota_error = 0;
|
||||||
|
|
||||||
void notify_progress(int size, int flag)
|
void notify_progress(int size, int flag)
|
||||||
{
|
{
|
||||||
@ -106,6 +107,13 @@ void wait_for_result()
|
|||||||
case EINVAL:
|
case EINVAL:
|
||||||
gui_fatal("File copy: Corrupted data from packer%s%s", last_filename_prefix, last_filename);
|
gui_fatal("File copy: Corrupted data from packer%s%s", last_filename_prefix, last_filename);
|
||||||
break;
|
break;
|
||||||
|
case EDQUOT:
|
||||||
|
if (ignore_quota_error) {
|
||||||
|
/* skip also CRC check as sender and receiver might be
|
||||||
|
* desynchronized in this case */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
/* fall though */
|
||||||
default:
|
default:
|
||||||
gui_fatal("File copy: %s%s%s",
|
gui_fatal("File copy: %s%s%s",
|
||||||
strerror(hdr.error_code), last_filename_prefix, last_filename);
|
strerror(hdr.error_code), last_filename_prefix, last_filename);
|
||||||
|
@ -166,6 +166,7 @@ static unsigned long tar_chksm (char *, int);
|
|||||||
char *gnu_hack_string; /* GNU ././@LongLink hackery */
|
char *gnu_hack_string; /* GNU ././@LongLink hackery */
|
||||||
|
|
||||||
char untrusted_namebuf[MAX_PATH_LENGTH];
|
char untrusted_namebuf[MAX_PATH_LENGTH];
|
||||||
|
extern int ignore_quota_error;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -820,6 +821,9 @@ int main(int argc, char **argv)
|
|||||||
//set_size_limit(1500000000, 2048);
|
//set_size_limit(1500000000, 2048);
|
||||||
|
|
||||||
crc32_sum = 0;
|
crc32_sum = 0;
|
||||||
|
/* when extracting backup header, dom0 will terminate the transfer with
|
||||||
|
* EDQUOT just after getting qubes.xml */
|
||||||
|
ignore_quota_error = 1;
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
set_nonblock(0);
|
set_nonblock(0);
|
||||||
if (strcmp(argv[i], "--ignore-symlinks")==0) {
|
if (strcmp(argv[i], "--ignore-symlinks")==0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user