main: set correct value of RENAME_NOREPLACE ifndef RENAME_EXACHANGE

Set correct value of RENAME_NOREPLACE when RENAME_EXCHANGE is not
already defined i.e use `1 << 0` instead of `1 << 2` which seems
incorrect.

Reference: f2906aa863/include/uapi/linux/fs.h (L50-L52)

Signed-off-by: Aditya R <arajan@redhat.com>
This commit is contained in:
Aditya R 2022-06-07 14:20:40 +05:30
parent 878cb0ccad
commit b010054b22
No known key found for this signature in database
GPG Key ID: 8E5A8A19DF7C8673

5
main.c
View File

@ -124,9 +124,12 @@ open_by_handle_at (int mount_fd, struct file_handle *handle, int flags)
}
#endif
#ifndef RENAME_NOREPLACE
# define RENAME_NOREPLACE (1 << 0)
#endif
#ifndef RENAME_EXCHANGE
# define RENAME_EXCHANGE (1 << 1)
# define RENAME_NOREPLACE (1 << 2)
#endif
#ifndef RENAME_WHITEOUT