Date: Fri, 05 Apr 2024 00:16:29 +0200 From: Steffen Nurpmeso <steffen@sdaoden.eu> To: Rick Macklem <rick.macklem@gmail.com> Cc: Alan Somers <asomers@freebsd.org>, FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: SEEK_HOLE at EOF Message-ID: <20240404221629.pFpzUB3t@steffen%sdaoden.eu> In-Reply-To: <CAM5tNy5btZGYz3Ya-8qFObycdmyWZEnuAOHquW6FNWjcL8_DuA@mail.gmail.com> References: <CAOtMX2gaHkH7gRT1OWTNpZEcr13%2BiozicmUDZ1hEapT6oiXiuQ@mail.gmail.com> <CAM5tNy7o%2BEpuFFfZ_4fEMmzDLydC6PkhgtcDjQ5mgufb5_7TVg@mail.gmail.com> <CAOtMX2giiOx5vTkUujU29JsbY8O2EqcMRDvtOQYQNbCfZZPLjg@mail.gmail.com> <CAM5tNy5btZGYz3Ya-8qFObycdmyWZEnuAOHquW6FNWjcL8_DuA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Rick Macklem wrote in <CAM5tNy5btZGYz3Ya-8qFObycdmyWZEnuAOHquW6FNWjcL8_DuA@mail.gmail.com>: |On Thu, Apr 4, 2024 at 1:59=E2=80=AFPM Alan Somers <asomers@freebsd.org> = wrote: |> |> On Thu, Apr 4, 2024 at 2:56=E2=80=AFPM Rick Macklem <rick.macklem@gmail= .com> \ |> wrote: |>> |>> On Thu, Apr 4, 2024 at 11:15=E2=80=AFAM Alan Somers <asomers@freebsd.o= rg> wrote: ... |>> Here's what it says about SEEK_HOLE and offset: |>> If whence is SEEK_HOLE, the file offset shall be set to the smallest |>> location of a byte within a hole and not less than offset, except that |>> if offset falls within the last hole, then the file offset may be set |>> to the file size instead. It shall be an error if offset is greater |>> or equal to the size of the file. |>> |>> I'd suggest we follow this, since it is the closest to a standard \ |>> that there is. |> |> That sounds like behavior 2: return ENXIO at EOF. For reference, do |> you have a link to that somewhere? |0000415: add SEEK_HOLE, SEEK_DATA to lseek - Austin Group Defect |Tracker (austingroupbugs.net) |If this doesn't give you a link (gmail never shows the raw url for me) |just google |"SEEK_HOLE austin group". just a few lines further below 46396 [ENXIO] The whence argument is SEEK_HO= LE or SEEK_DATA, and offset is greater 46397 than or equal to the file size= ; or the whence argument is SEEK_DATA and the 46398 offset falls beyond the last b= yte not within a hole. ... --End of <CAM5tNy5btZGYz3Ya-8qFObycdmyWZEnuAOHquW6FNWjcL8_DuA@mail.gmail\ .com> --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20240404221629.pFpzUB3t>