mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: antonpoon@hongkong.com
To: linux-kernel@vger.kernel.org
Subject: How can I add a function to the kernel initialization
Date: Wed, 11 Apr 2001 16:07:07 +0800 (CST)	[thread overview]
Message-ID: <Eq989588839292.22828@mail2.hongkong.com> (raw)

I have written a driver for a character set LCD module using parallel port. I want to display a message when the kernel is initialized. 

I added the following to start_kernel() in init/main.c

#include <stdio.h>

{
  int i;
  char line = "Loading Kernel";
  FILE *ptr;
  ptr = fopen("/dev/lcd","w");
  
  for (i=0;i<10;i++)
  {
  	fprintf(ptr, "%s\n", line);
  }
  fclose(ptr);
}
   
Error was found, it looks like that it can not include stdio.h in the initialization.
How can I do that?

I wish to be personally CC'ed the answers/comments posted to the list in response to my posting. Thank you.

Best Regards,
Anton



---------------------------------------------
 Åwªï¨Ï¥ÎHongKong.com¶l¥ó¨t²Î
 Thank you for using hongkong.com Email system


             reply	other threads:[~2001-04-11  8:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-11  8:07 antonpoon [this message]
2001-04-11 11:22 ` Bart Trojanowski
2001-04-11 13:16   ` Padraig Brady
2001-04-15 14:20 James Simmons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Eq989588839292.22828@mail2.hongkong.com \
    --to=antonpoon@hongkong.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®