mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: returning text from a system call
       [not found] <fa.ln13q27.174i3bp@ifi.uio.no>
@ 2004-06-23  2:49 ` Robert Hancock
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Hancock @ 2004-06-23  2:49 UTC (permalink / raw)
  To: linux-kernel

I'm guessing this is an exercise or something - I'm not sure exactly what
you're trying to accomplish with this - but if you created a new system
call, all you'd likely need to do is to have the caller pass in a pointer to
a buffer, as well as the buffer size, with the system call, then just copy
the data into/out of the buffer using copy_to_user and copy_from_user.


----- Original Message ----- 
From: "so usp" <so_usp@yahoo.com.br>
Newsgroups: fa.linux.kernel
To: <linux-kernel@vger.kernel.org>
Sent: Monday, June 21, 2004 2:28 PM
Subject: returning text from a system call


> 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?
>
> Thanks, and sorry for the English.
> so_usp
>
> ______________________________________________________________________
>
> Yahoo! Mail - agora com 100MB de espaço, anti-spam e antivírus grá=
> tis!
> http://br.info.mail.yahoo.com/
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel"=
>  in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: returning text from a system call
  2004-06-21 20:27 so usp
@ 2004-06-22  8:50 ` Helge Hafting
  0 siblings, 0 replies; 3+ messages in thread
From: Helge Hafting @ 2004-06-22  8:50 UTC (permalink / raw)
  To: so usp; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* returning text from a system call
@ 2004-06-21 20:27 so usp
  2004-06-22  8:50 ` Helge Hafting
  0 siblings, 1 reply; 3+ messages in thread
From: so usp @ 2004-06-21 20:27 UTC (permalink / raw)
  To: linux-kernel

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?

Thanks, and sorry for the English.
so_usp 

______________________________________________________________________

Yahoo! Mail - agora com 100MB de espaço, anti-spam e antivírus grátis!
http://br.info.mail.yahoo.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-06-23  2:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <fa.ln13q27.174i3bp@ifi.uio.no>
2004-06-23  2:49 ` returning text from a system call Robert Hancock
2004-06-21 20:27 so usp
2004-06-22  8:50 ` Helge Hafting

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®