Re: puzzle about open in kernel

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

 



Only in the very first linux, say 0.xx, it's true in usermode.
I guess it may be a historical reason to use open instead of sys_open.

----- Original Message -----
From: "coywolf" <coywolf@lovecn.org>
To: <admin@ercist.iscas.ac.cn>; <kernelnewbies@nl.linux.org>
Sent: Friday, December 05, 2003 4:46 PM
Subject: Re: puzzle about open in kernel


> It's in usermode, so sys_open() is not available, here we have to use
open.
>
> Coywolf
>
> ----- Original Message -----
> From: "madsys" <admin@ercist.iscas.ac.cn>
> To: <kernelnewbies@nl.linux.org>
> Sent: Friday, December 05, 2003 3:17 PM
> Subject: puzzle about open in kernel
>
>
> > hi all,
> >
> > I have a puzzle about open() in kernel lately.
> >
> > see below please:
> >
> > init/main.c [init()]:
> > ---snip---
> > if (open("/dev/console", O_RDWR, 0) < 0)
> > printk("Warning: unable to open an initial console.\n");
> > ---snip---
> >
> >     I know that open() is a wrapper of system call. But who can tell me
> why the kernel use system call "open" instead of the direct sys_open
> function in the kernel? Can we change it to the sys_open function here?
> >
> >
> > thanx in advanced!
> > madsys
> >
> >
> >
> > --
> > Kernelnewbies: Help each other learn about the Linux kernel.
> > Archive:       http://mail.nl.linux.org/kernelnewbies/
> > FAQ:           http://kernelnewbies.org/faq/
> >
> >
>
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
>
>

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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