home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / D / LIBC / LIBC-4.6 / LIBC-4 / libc-linux / compat / m68k / __old__uname.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-19  |  349 b   |  20 lines

  1. #include <errno.h>
  2. #include <linux/utsname.h>
  3. #include <sys/syscall.h>
  4.  
  5. int
  6. __old__uname (struct old_utsname *buf)
  7. {
  8.     register int res asm ("d0") = SYS_olduname;
  9.  
  10.     __asm__("movel %2,d1\n\t"
  11.                 "trap #0"
  12.         :"=g" (res)
  13.         :"0" (SYS_olduname),"g" (buf)
  14.                 : "d0", "d1");
  15.     if (res>=0)
  16.         return res;
  17.     errno = -res;
  18.     return -1;
  19. }
  20.