xv6

port of xv6 to x86-64
git clone http://frotz.net/git/xv6.git
Log | Files | Refs | README | LICENSE

ln.c (264B)


      1 #include "types.h"
      2 #include "stat.h"
      3 #include "user.h"
      4 
      5 int
      6 main(int argc, char *argv[])
      7 {
      8   if(argc != 3){
      9     printf(2, "Usage: ln old new\n");
     10     exit();
     11   }
     12   if(link(argv[1], argv[2]) < 0)
     13     printf(2, "link %s %s: failed\n", argv[1], argv[2]);
     14   exit();
     15 }