Xv6 with picoc & Linkage editor
v1.0
The project delineate mutual cohesion between c library, linkage editor ( linker), interpreter and operating system by porting the same on xv6 kernel
|
00001 #include "types.h" 00002 #include "stat.h" 00003 #include "user.h" 00004 00005 int 00006 main(int argc, char *argv[]) 00007 { 00008 int i; 00009 00010 if(argc < 2){ 00011 printf( "Usage: rm files...\n"); 00012 exit(1); 00013 } 00014 00015 for(i = 1; i < argc; i++){ 00016 if(unlink(argv[i]) < 0){ 00017 printf( "rm: %s failed to delete\n", argv[i]); 00018 break; 00019 } 00020 } 00021 00022 exit(1); 00023 }