![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| C:system call | Dedalus | High Level Programming | 2 | 06-23-2009 03:23 AM |
| system call | hegdeshashi | Shell Programming and Scripting | 10 | 06-16-2009 01:11 AM |
| System call in CGI not work | tqlam | Shell Programming and Scripting | 6 | 03-18-2008 09:52 PM |
| c system call | rangaswamy | High Level Programming | 1 | 02-19-2008 01:53 PM |
| how to differentiate system call from library call | muru | UNIX for Advanced & Expert Users | 2 | 07-19-2007 11:20 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
System Call Wrapper of 'open'
When the programmer use 'open' function, the process is like below.
"open -> system call wrapper of open in Glibc -> syscall_open in kernel" I found the wrapper of open, but there is no implementation like 'int $80'. Code:
int
__open (file, oflag)
const char *file;
int oflag;
{
int mode;
if (file == NULL)
{
__set_errno (EINVAL);
return -1;
}
if (oflag & O_CREAT)
{
va_list arg;
va_start(arg, oflag);
mode = va_arg(arg, int);
va_end(arg);
}
__set_errno (ENOSYS);
return -1;
}
|
|
||||
|
This looks to me like you found a stub that's intended for someone to fill in for a specific system, given that no matter what you do to call it, it will return -1 and set errno. That said, I'm not sure why they would do all the other stuff just to return -1.
You need to be looking in a different place, I think. |
|
||||
|
Are you referring to syscall in Linux?
You need to read this page, then download the kernel source if you want. http://tldp.org/HOWTO/Implement-Sys-...-i386/x50.html |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|