Re: O_RDONLY|O_TRUNC, truncate() semantics (was: Silly question...?

Hans-Joachim Widmaier (hjwidmai@foxboro.com)
Mon, 2 Feb 1998 13:08:29 +0100


Peter Moulder:
>
> Hans-Joachim Widmaier <hjwidmai@foxboro.com> sent a month ago a patch
> to allow i_op->truncate() to return error codes. I have to admit I
> haven't applied his patch (it overlaps with another patch), but I'd
> like for his patch to be applied. truncate() can fail, and the user
> ought to be informed if it has failed. I think tht the Single Unix
> Specification requires this: "Upon successful completion, ftruncate()
> and truncate() return 0. Otherwise a -1 is returned, and errno is set
> to indicate the error."

I've redone the patch for 2.1.78 and sent it to Bill Hawes, who
requested it from me (he wanted to change the truncate() functions
to use dentries). Seems he hasn't got around doing it yet.

-- 
Hans-Joachim Widmaier