All of lore.kernel.org
 help / color / mirror / Atom feed
* errors in debugging "services.c"
@ 2007-03-18  9:54 JanuGerman
  2007-03-19  2:47 ` Joshua Brindle
  2007-03-19 13:51 ` Stephen Smalley
  0 siblings, 2 replies; 3+ messages in thread
From: JanuGerman @ 2007-03-18  9:54 UTC (permalink / raw)
  To: SELinux List

Hi Every body,

  I have included some "print" and some "manipulation"
statements with the ss/services.c file, in order to
get some of output, at various places during kernel
compilation.

 Unfortunately, i was not successful, in doing so, and
got a long list of errors, for missing standard
libraries e.g: 

security/selinux/ss/services.c:44:19: error: stdio.h:
No such file or directory
error: string.h: No such file or directory
error: stdlib.h: No such file or directory
error: stdint.h: No such file or directory
error: stderr undeclared (first use in this function)

(i have truncated the errors, because they were too
much verbose)


The difficulty is that, when i execute these print and
manipulation statements as a sepeate file within the
kerncel source tree i.e. within ss/, no problem at
all, and all went well. I think so, i am making some
path problems. If some body, can suggest me some thing
in this regard.

Thanking you in advance.
Best,
MA




		
___________________________________________________________ 
The all-new Yahoo! Mail goes wherever you go - free your email address from your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

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

* Re: errors in debugging "services.c"
  2007-03-18  9:54 errors in debugging "services.c" JanuGerman
@ 2007-03-19  2:47 ` Joshua Brindle
  2007-03-19 13:51 ` Stephen Smalley
  1 sibling, 0 replies; 3+ messages in thread
From: Joshua Brindle @ 2007-03-19  2:47 UTC (permalink / raw)
  To: JanuGerman; +Cc: SELinux List

JanuGerman wrote:
> Hi Every body,
>
>   I have included some "print" and some "manipulation"
> statements with the ss/services.c file, in order to
> get some of output, at various places during kernel
> compilation.
>
>  Unfortunately, i was not successful, in doing so, and
> got a long list of errors, for missing standard
> libraries e.g: 
>
> security/selinux/ss/services.c:44:19: error: stdio.h:
> No such file or directory
> error: string.h: No such file or directory
> error: stdlib.h: No such file or directory
> error: stdint.h: No such file or directory
> error: stderr undeclared (first use in this function)
>
> (i have truncated the errors, because they were too
> much verbose)
>
>
> The difficulty is that, when i execute these print and
> manipulation statements as a sepeate file within the
> kerncel source tree i.e. within ss/, no problem at
> all, and all went well. I think so, i am making some
> path problems. If some body, can suggest me some thing
> in this regard.
>   
Are you trying to use fprintf or other libc functions? (i see stderr 
there, which doesn't exist in the kernel), the kernel doesn't use 
standard libc calls, printk should be used to print out information to 
the kernel ring buffer, which can be checked with the dmesg command, 
with a flag such as KERN_INFO, KERN_ERR, etc to specify how critical it is.


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

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

* Re: errors in debugging "services.c"
  2007-03-18  9:54 errors in debugging "services.c" JanuGerman
  2007-03-19  2:47 ` Joshua Brindle
@ 2007-03-19 13:51 ` Stephen Smalley
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Smalley @ 2007-03-19 13:51 UTC (permalink / raw)
  To: JanuGerman; +Cc: SELinux List

On Sun, 2007-03-18 at 09:54 +0000, JanuGerman wrote:
> Hi Every body,
> 
>   I have included some "print" and some "manipulation"
> statements with the ss/services.c file, in order to
> get some of output, at various places during kernel
> compilation.
> 
>  Unfortunately, i was not successful, in doing so, and
> got a long list of errors, for missing standard
> libraries e.g: 
> 
> security/selinux/ss/services.c:44:19: error: stdio.h:
> No such file or directory
> error: string.h: No such file or directory
> error: stdlib.h: No such file or directory
> error: stdint.h: No such file or directory
> error: stderr undeclared (first use in this function)
> 
> (i have truncated the errors, because they were too
> much verbose)
> 
> 
> The difficulty is that, when i execute these print and
> manipulation statements as a sepeate file within the
> kerncel source tree i.e. within ss/, no problem at
> all, and all went well. I think so, i am making some
> path problems. If some body, can suggest me some thing
> in this regard.

Dropping a new .c file into the ss/ subdirectory doesn't cause it to be
built as part of the kernel build unless you also update ss/Makefile, so
likely your separate file isn't being built at all.

And you can't use stdio from the kernel naturally.  New to kernel
development?  You might want to go to:
http://kernelnewbies.org/
and get yourself a good book on Linux kernel development.  Please don't
ask basic questions about kernel development here.

-- 
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

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

end of thread, other threads:[~2007-03-19 13:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-18  9:54 errors in debugging "services.c" JanuGerman
2007-03-19  2:47 ` Joshua Brindle
2007-03-19 13:51 ` Stephen Smalley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.