David Yang, le lun. 02 mars 2026 06:16:26 +0800, a ecrit:
> On Mon, Mar 2, 2026 at 6:07 AM Samuel Thibault <[email protected]> 
> wrote:
> > David Yang, le lun. 02 mars 2026 06:06:01 +0800, a ecrit:
> > > I'm investigating
> > > https://buildd.debian.org/status/package.php?p=libite and found
> > > printf("%d\n", stat("/dev/zero", &st)) give -1.
> >
> > What errno does it yield?
> 
> EOVERFLOW 0x40000073

Ah... I see in hurd/libstore/zero.c that it sets the file size to the
maximum integer value, which is 64b, and thus cannot be fetched with a
mere stat(), only stat64().

Since on Linux /dev/zero is zero-sized, I guess there would be no
adverse effect of making it zero-sized on the Hurd too.

But making the zero backend of libstore expose a zero-size might break
some uses such as in-memory disk image overlay or such. Perhaps the
safest would be to make zero_open() set (*store)->size to zero just
after creating it.

Samuel

Reply via email to