3
0

Accepting request 900395 from home:lnussel:usrmove

- unsafe fallback also for ENOSYS on renameat2 as seen on WSL

OBS-URL: https://build.opensuse.org/request/show/900395
OBS-URL: https://build.opensuse.org/package/show/Base:System/compat-usrmerge?expand=0&rev=20
This commit is contained in:
Ludwig Nussel 2021-06-16 14:06:39 +00:00 committed by Git OBS Bridge
parent dd9e771105
commit a104c53819
2 changed files with 4 additions and 1 deletions

View File

@ -2,6 +2,7 @@
Tue Jun 15 15:27:41 UTC 2021 - Ludwig Nussel <lnussel@suse.de>
- another fix for split /usr to avoid running out of space (boo#1186781)
- unsafe fallback also for ENOSYS on renameat2 as seen on WSL
-------------------------------------------------------------------
Tue Jun 8 12:03:52 UTC 2021 - Ludwig Nussel <lnussel@suse.de>

4
xmv.c
View File

@ -70,7 +70,9 @@ int main(int argc, char** argv)
const char *source = argv[optind], *target = argv[optind+1];
r = syscall (SYS_renameat2, AT_FDCWD, source, AT_FDCWD, target, RENAME_EXCHANGE);
if (r < 0) {
if (errno != EINVAL) {
// FS not supporting RENAME_EXCHANGE -> EINVAL
// No renameat2 syscall -> ENOSYS (eg WSL)
if (errno != EINVAL && errno != ENOSYS) {
perror("renameat2");
return 1;
}