[Rpm-maint] [rpm-software-management/rpm] Add macro to force fsync() on close() (#187)
Phil Dibowitz
notifications at github.com
Wed Apr 5 18:51:06 UTC 2017
jaymzh commented on this pull request.
> + int rc = 0, ec = 0;
+
+ if (fd == NULL)
+ return -1;
+
+ fd = fdLink(fd);
+ for (FDSTACK_t fps = fd->fps; fps != NULL; fps = fps->prev) {
+ if (fps->fdno >= 0) {
+ rc = fsync(fps->fdno);
+ if (ec == 0 && rc)
+ ec = rc;
+ }
+
+ /* Leave freeing the last one after stats */
+ if (fps->prev == NULL)
+ break;
Ah. Woops, cleaned both of those up. Thanks.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/187#discussion_r109998465
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20170405/140f6c6c/attachment.html>
More information about the Rpm-maint
mailing list