On 6 Dec 99 at 20:07, Marc SCHAEFER wrote:
> > I probably missed something important, but what's wrong with
> > approach d_path() is using now - returning pointer into middle of buffer?
> The lack of precize documentation. The fact that it's not obvious (at
> least to me) what happens if the buffer is too small.
Only part which fit into buffer is returned. But if you have path
which is longer than MAX_PATH_LEN, you are in big troubles. You cannot
pass this path back to kernel :-(
> And the fact
> that the routine seem to add " (deleted)" in some cases to the
> buffer, to my knowledge in a way you can't easily know if it's
> part of the file name or not.
That's a problem. But you should not pass deleted path into d_path,
as result is meaningless then. Sometime ago there was discussion to
change format from
/xxxx (deleted)
to
deleted:/xxxx
as string returned from d_path normally always start with slash. But some
peoples thought that it could break ps-tools, fuser and other simillar
programs.
Best regards,
Petr Vandrovec
[EMAIL PROTECTED]