[source navigation] [diff markup] [identifier search] [freetext search] [file search]

Oldlinux Cross Reference
Linux/lib/open.c

Version: [1.0] [0.99.11] [0.99] [0.98] [0.97] [0.96a] [0.95] [0.12] [0.11] [0.01]
Architecture: [i386]

  1 /*
  2  *  linux/lib/open.c
  3  *
  4  *  (C) 1991  Linus Torvalds
  5  */
  6 
  7 #define __LIBRARY__
  8 #include <unistd.h>
  9 #include <stdarg.h>
 10 
 11 int open(const char * filename, int flag, ...)
 12 {
 13         register int res;
 14         va_list arg;
 15 
 16         va_start(arg,flag);
 17         __asm__("int $0x80"
 18                 :"=a" (res)
 19                 :"" (__NR_open),"b" (filename),"c" (flag),
 20                 "d" (va_arg(arg,int)));
 21         if (res>=0)
 22                 return res;
 23         errno = -res;
 24         return -1;
 25 }
 26 

[source navigation] [diff markup] [identifier search] [freetext search] [file search]

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.