Re: [Rpm-maint] [rpm-software-management/rpm] Fix Fseek for offset > 2GiB (#1381)
Hmm, for some reason CI is refusing to run for this. I'll open a separate PR for this, there doesn't seem to be any way to force it through here. No clue... -- 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/1381#issuecomment-706021393___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix Fseek for offset > 2GiB (#1381)
Merged via #1390, no idea why this wasn't running the CI. Anyway, thanks again. -- 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/1381#issuecomment-706027988___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix Fseek for offset > 2GiB (#1381)
Closed #1381. -- 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/1381#event-385610___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix Fseek for offset > 2GiB (#1381)
@pmatilai approved this pull request. Third time the charm... Thanks for the patch and perseverance! :sweat_smile: -- 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/1381#pullrequestreview-505374447___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix Fseek for offset > 2GiB (#1381)
@malmond77 pushed 1 commit. 7ae16d6bd37abdcc0430fbb1b25a0f821a60c234 Make fdSeek return 0 on success, -1 on error -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/1381/files/cd68e1861ceb256a329067ecf2a513e48e3da7f3..7ae16d6bd37abdcc0430fbb1b25a0f821a60c234 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix Fseek for offset > 2GiB (#1381)
@malmond77 commented on this pull request. > @@ -382,7 +382,7 @@ static ssize_t fdWrite(FDSTACK_t fps, const void * buf, > size_t count) static int fdSeek(FDSTACK_t fps, off_t pos, int whence) { -return lseek(fps->fdno, pos, whence); +return (lseek(fps->fdno, pos, whence)) == -1 ? -1 : 0; ah crap, will fix! -- 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/1381#discussion_r501837418___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix Fseek for offset > 2GiB (#1381)
@pmatilai commented on this pull request. > @@ -382,7 +382,7 @@ static ssize_t fdWrite(FDSTACK_t fps, const void * buf, > size_t count) static int fdSeek(FDSTACK_t fps, off_t pos, int whence) { -return lseek(fps->fdno, pos, whence); +return (lseek(fps->fdno, pos, whence)) == -1 ? -1 : 0; Sorry but that's still not right. There's no point having the extra parenthesis there unless the equality test is inside them. See my previous comment. -- 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/1381#pullrequestreview-504567241___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix Fseek for offset > 2GiB (#1381)
@malmond77 pushed 1 commit. cd68e1861ceb256a329067ecf2a513e48e3da7f3 Make fdSeek return 0 on success, -1 on error -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/1381/files/fd36e8c25c93eab627824281886e5a5b9e695255..cd68e1861ceb256a329067ecf2a513e48e3da7f3 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix Fseek for offset > 2GiB (#1381)
@pmatilai commented on this pull request. > @@ -382,7 +382,7 @@ static ssize_t fdWrite(FDSTACK_t fps, const void * buf, > size_t count) static int fdSeek(FDSTACK_t fps, off_t pos, int whence) { -return lseek(fps->fdno, pos, whence); +return (lseek(fps->fdno, pos, whence) == -1 ? -1 : 0); Mm, sorry for missing this earlier, was just about to merge when I spotted something strange with the parenthesis: enclosing it all in parenthesis makes no sense and doesn't help readability either, it should be: ``` return (lseek(fps->fdno, pos, whence) == -1) ? -1 : 0; ``` -- 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/1381#pullrequestreview-503530765___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix Fseek for offset > 2GiB (#1381)
@malmond77 pushed 1 commit. fd36e8c25c93eab627824281886e5a5b9e695255 Make fdSeek return 0 on success, -1 on error -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/1381/files/4124cee2d134b3fca4b215e8cc7068b8eda0d3a0..fd36e8c25c93eab627824281886e5a5b9e695255 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix Fseek for offset > 2GiB (#1381)
Please leave out the return codes documentation because that only makes the broken -2 return documented and stand out for as something special and supported for Fseek() when it can happen for pretty much anything for all sorts of arbitrary reasons. I think we should instead fix all those cases to return -1 with errno set instead (but that is obviously beyond the scope of this PR) -- 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/1381#issuecomment-704047432___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix Fseek for offset > 2GiB (#1381)
I've omitted the changes to the call sites because Fseek can also return -2 if not implemented. I think this is quite academic here - there's little chance of a user facing choice for compressed vs uncompressed IO. -- 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/1381#issuecomment-703876509___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix Fseek for offset > 2GiB (#1381)
@malmond77 pushed 1 commit. 6ebd043a072f3a886dc8530bc53ff968705e0360 Make Fseek return off_t not int -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/1381/files/d08be83a5d5e8b6020951f39ff97b96f7cda171b..6ebd043a072f3a886dc8530bc53ff968705e0360 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix Fseek for offset > 2GiB (#1381)
@pmatilai requested changes on this pull request. Fseek() is modelled after fseek(), not lseek(), and intended to return an int. You're totally right that there are bugs though, lseek() return should not be used directly but instead converted to something like `return (lseek(...) == -1 : -1 : 0)` -- 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/1381#pullrequestreview-501757960___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix Fseek for offset > 2GiB (#1381)
@Conan-Kudo approved this pull request. -- 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/1381#pullrequestreview-501564578___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint