mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: jensen galan <jrgalan@yahoo.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Re: Adding a system call to kernel
Date: Mon, 9 May 2005 22:39:14 -0700 (PDT)	[thread overview]
Message-ID: <20050510053914.77609.qmail@web40907.mail.yahoo.com> (raw)

Thanks Geert.

You know, I knew I had to do include this, and spent
all weekend trying to figure out where to include
<errno.h>.

But, for some reason, after reading your reply, the
simplicity dawned on me - include it in the user-space
program dummy.

That's what you should have written ;)

Thanks again - it worked!

Jensen

--- Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Mon, 9 May 2005, jensen galan wrote:
> > I am trying to add a system call to a 2.4 kernel. 
> > It's a simple system call which merely prints the
> > value of xtime.  The kernel recompiles OK, and my
> > user-space program (p5_a.c) actually works using
> the
> > added system call when I use syscall() and do not
> > generate a stub. (The 2 versions of my user-space
> > programs are included below).  However, when I try
> to
> > generate a stub in my user-space program using
> > _syscall2(), I receive the following compilation
> > error:
> > 
> > # gcc -Wall -D__KERNEL__ -I
> > /lib/modules/2.4.28-gentoo-r5/build/include -o
> p5_b
> > p5_b.c
> > /tmp/cc5nBrjZ.o(.text+0x23): In function
> > 'pedagogictime':
> > : undefined reference to 'errno'
> > collect2: ld returned 1 exit status
> 
> Please include <errno.h>
> 
> Gr{oetje,eeting}s,
> 
> 						Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond
> ia32 -- geert@linux-m68k.org
> 
> In personal conversations with technical people, I
> call myself a hacker. But
> when I'm talking to journalists I just say
> "programmer" or something like that.
> 							    -- Linus Torvalds
> -
> 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/
> 


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail

             reply	other threads:[~2005-05-10  5:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-10  5:39 jensen galan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-05-10  5:23 jensen galan
2005-05-10  5:30 ` Geert Uytterhoeven
2005-05-10 11:35 ` Richard B. Johnson

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=20050510053914.77609.qmail@web40907.mail.yahoo.com \
    --to=jrgalan@yahoo.com \
    --cc=geert@linux-m68k.org \
    --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®