[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
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/