[Click] opening handler file
Eddie Kohler
kohler at cs.ucla.edu
Tue Mar 4 10:40:53 EST 2008
You can't open handlers in append mode. You must supply O_TRUNC when opening
a handler file for writing.
If you really really really need this functionality, I suppose it could be
done for read/write handlers by making append mode equal a read followed by
writes. But this is not the usual semantics of append mode. Better to make
your program work without it.
Eddie
Giovanni Di Stasi wrote:
> I'm writing a program which runs in user context and opens and writes into a handler file exported by click in kernel mode.
>
> I'm having problems in opening that file:
>
> int fd_links;
> fd_links=open("/click/element/handler", O_WRONLY | O_APPEND);
>
> The open call returns -1, and the error is "Permission denied".
>
> The program runs with root privileges (at least I think so, it is a olsrd plugin).
>
> Do you have any hints? I tried other flags, but I always get that error.
>
>
>
> ___________________________________
> L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html
>
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
More information about the click
mailing list