Re: returning text from a system call

From: Helge Hafting
Date: Tue Jun 22 2004 - 03:49:15 EST


On Mon, Jun 21, 2004 at 05:27:02PM -0300, so usp wrote:
> Hi,
>
> I'm implementing a system call, and I want to return
> information (text data) to the user without using the
> /var/log/messages (using the printk function). I've
> been thinking about writing in a file, but I really
> don't know how to manipulate files in kernel mode. The
> text could be returned to the command line as well,
> but I either don't know how to do that. Does anybody
> could help me how to return text (both ways would be
> good) from a system call?
>

What is it you want to do exactly? What kind of text?

Consider making a device driver - a device driver
can return text to the program reading from the device.

If that doesn't fit your needs, consider creating a file
in /proc.



Helge Hafting
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/