Date: Tue, 20 Dec 2011 14:18:58 -0800 From: mdf@FreeBSD.org To: John Baldwin <jhb@freebsd.org> Cc: Robert Watson <rwatson@freebsd.org>, current@freebsd.org Subject: Re: extattr_set_*() return type Message-ID: <CAMBSHm-6VpY_8BkkSJyDThw3DwioaSvC=soZQqcYDAE3jh3oqA@mail.gmail.com> In-Reply-To: <201112201649.06265.jhb@freebsd.org> References: <201112201649.06265.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 20, 2011 at 1:49 PM, John Baldwin <jhb@freebsd.org> wrote: > Hmm, if these functions are expected to operate like 'write(2)' and are > supposed to return the number of bytes written, shouldn't their return va= lue > be 'ssize_t' instead of 'int'? =A0It looks like the system calls themselv= es > already do the right thing in setting td_retval[] (they assign a ssize_t = to it > and td_retval[0] can hold a ssize_t on all of our current platforms). =A0= It > would seem that the only change would be to the header and probably > syscalls.master. =A0I guess this would require a symver bump to fix thoug= h. An extended attribute larger than 2GB is a programming abuse, though. Technically int may not be 32 bits but it is on all supported platforms now. Cheers, matthew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMBSHm-6VpY_8BkkSJyDThw3DwioaSvC=soZQqcYDAE3jh3oqA>