On Mon, Feb 02, 2026 at 09:48:59PM +0000, Jordan Richards wrote:
> Hi Mike,
>
> Thanks for the feedback.
>
> >> +int sys_ftruncate(int fd, off_t length)
> >> +{
> >> + return my_syscall2(__NR_ftruncate, fd, length);
> >> +}
> >> +
> >> +int ftruncate(int fd, off_t length)
> >> +{
> >> + return __sysret(sys_ftruncate(fd, length));
> >> +}
> >
> > These should be added to nolibc I suppose.
>
> I notice that nolibc has its own tree. If I patch nolibc/sys.h,
> will those changes make their way there? Or should I avoid modifying
> nolibc/sys.h and keep this local copy for now, to be removed if/when
> ftruncate is added to nolibc?
I think you can make this a set of two patches: the first that adds
ftruncate to nolibc and the second with LUO test.
Then with an Ack from nolibc maintainer both can be merged via Andrew's tree.
--
Sincerely yours,
Mike.