Re: How printf output messages to kernel with uclibc lib

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 01 February 2009 11:00, loody wrote:
> > [f]printf ultimately results in write() syscalls performed on
> > open file descriptors.
> >
> > If you have trouble verifying that your userspace programs
> > are able to execute, start with this test program:
> >
> > int main() {
> >        write(1, "Hello\n", 6);
> >        for (;;)
> >                continue;
> > }
> >
> > Compile it and run as init. You should see "Hello"
> > message. If you don't, your toolchain is producing broken
> > executables.
> > --
> > vda
> >
> 
> Hi:
> I have search the calls.S in arch/arm/kernel, but I cannot find the
> sys call, write, you mention.

You don't know what you are doing.

It's in sysdeps/linux/common/write.c in uclibc tree.

> ( I use arm platform, so I search the syscalls implemented by arm)
> Is it a wrap function? If so, I guess I should include some header to do so.
> But I have no idea what header I can use.
> appreciate your help,
> miloody

It looks like you think these lists are a proper place to get educated
in basic C and programming skills. It can be achieved far faster
by reading abundand info available on the Web.
--
vda

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux