Compare commits

...

4 Commits

Author SHA1 Message Date
Olivier MEDOC
ea0c714139 Fix gcc Werror because of a typo in a switch/case explicit fallthrough comment
GCC crash because of -Werror=implicit-fallthrough. However the fallthrough exists but has a typo.

Thanks for omac777 analysis (7d0b8155a3)

However the fallthrough exists but has a typo
2017-09-12 21:05:40 +02:00
Rusty Bird
0677fce533
Fall back to sync() if syncfs() is unavailable
It seems better to err on the side of safety (vs. performance).

(cherry picked from commit 90a1e6abbd)
2017-07-04 13:30:18 +02:00
Marek Marczykowski-Górecki
7e42fb5efd
rpm: add missing build requires
(cherry picked from commit ae56d597f3)
2017-04-21 16:55:41 +02:00
unman
d359d63fd6
Improve error message when file exists
(cherry picked from commit 1db0daea9c)
Notes from origin:
    Fixes QubesOS/qubes-issues#1240
2017-04-21 16:15:31 +02:00
3 changed files with 6 additions and 2 deletions

View File

@ -89,7 +89,7 @@ void wait_for_result(void)
if (hdr.error_code != 0) { if (hdr.error_code != 0) {
switch (hdr.error_code) { switch (hdr.error_code) {
case EEXIST: case EEXIST:
call_error_handler("File copy: not overwriting existing file. Clean QubesIncoming dir, and retry copy%s%s", last_filename_prefix, last_filename); call_error_handler("A file named %s already exists in QubesIncoming dir", last_filename);
break; break;
case EINVAL: case EINVAL:
call_error_handler("File copy: Corrupted data from packer%s%s", last_filename_prefix, last_filename); call_error_handler("File copy: Corrupted data from packer%s%s", last_filename_prefix, last_filename);
@ -100,7 +100,7 @@ void wait_for_result(void)
* desynchronized in this case */ * desynchronized in this case */
return; return;
} }
/* fall though */ /* fallthrough */
default: default:
call_error_handler("File copy: %s%s%s", call_error_handler("File copy: %s%s%s",
strerror(hdr.error_code), last_filename_prefix, last_filename); strerror(hdr.error_code), last_filename_prefix, last_filename);

View File

@ -237,6 +237,8 @@ int do_unpack(void)
cwd_fd = open(".", O_RDONLY); cwd_fd = open(".", O_RDONLY);
if (cwd_fd >= 0 && syncfs(cwd_fd) == 0 && close(cwd_fd) == 0) if (cwd_fd >= 0 && syncfs(cwd_fd) == 0 && close(cwd_fd) == 0)
errno = saved_errno; errno = saved_errno;
#else
sync();
#endif #endif
send_status_and_crc(errno, untrusted_namebuf); send_status_and_crc(errno, untrusted_namebuf);

View File

@ -19,6 +19,8 @@ Requires: %{name}-libs
Requires: ImageMagick Requires: ImageMagick
Requires: pycairo Requires: pycairo
BuildRequires: qubes-libvchan-devel BuildRequires: qubes-libvchan-devel
# for meminfo-writer
BuildRequires: xen-devel
%description %description
Common Linux files for Qubes Dom0 and VM Common Linux files for Qubes Dom0 and VM