> >uggh.. do you not know? did you not put it there?
> >
> No. I didnt put it there. I am writing a library function as follows:
> void log_string(char *in_str)
> {
> ..... open file, write string, close file
> ..... write '\0' to *in_str to clear the log msg if in data seg
> }
>
> I agree it's ugly, but it needs to be done for backward compatablity
> reasons.
It's not ugly it sounds insane.. why write a \0 to it, if a string is in
the data segment you've either allocated memory for it or forced it in
there, you don't get the memory back by shoving a \0 into the first byte
of it so why would anyone in their right mind want this..
it sounds like someone came up with this as a cool idea but at a guess I
can't think of any actual use for it .. I'm sure ye have one but I'd love
to know what a calling function would be doing taking any notice of it,
Backwards compat isn't nice and I did wonder why Linux doesn't have
support for this but thinking about it I can't see anyone coming up with a
use for it,
Dave.
>
> Under QNX I had a function _ispermitw(void *addr) to test write access.
>
> Yes, from user space.
> From kernel space I actually know how to do!!
>
> Regards,
>
> Andy
>
>
>
>
--
David Airlie, Software Engineer
http://www.skynet.ie/~airlied / [EMAIL PROTECTED]
pam_smb / Linux DecStation / Linux VAX / ILUG person
--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug