root/user/ln.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. main

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

/* [<][>][^][v][top][bottom][index][help] */