Page MenuHomeFreeBSD

D44756.diff
No OneTemporary

D44756.diff

diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c
--- a/usr.bin/xinstall/xinstall.c
+++ b/usr.bin/xinstall/xinstall.c
@@ -1232,15 +1232,12 @@
#ifndef BOOTSTRAP_XINSTALL
/* Try copy_file_range() if no digest is requested */
if (digesttype == DIGEST_NONE) {
- ret = 1;
- while (ret > 0) {
+ do {
ret = copy_file_range(from_fd, NULL, to_fd, NULL,
SSIZE_MAX, 0);
- }
- if (ret == 0) {
- /* DIGEST_NONE always returns NULL */
- return (NULL);
- }
+ } while (ret > 0);
+ if (ret == 0)
+ goto done;
if (errno != EINVAL) {
serrno = errno;
(void)unlink(to_name);
@@ -1313,6 +1310,7 @@
err(EX_OSERR, "%s", from_name);
}
}
+done:
if (safecopy && fsync(to_fd) == -1) {
serrno = errno;
(void)unlink(to_name);

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 11, 4:54 AM (18 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15750366
Default Alt Text
D44756.diff (777 B)

Event Timeline