1 #include "ls.h" 2 #include "true.h" 3 #include "false.h" 4 #include "rm.h" 5 #include "whoami.h" 6 #include "mount.h" 7 #include "rmdir.h" 8 #include "umount.h" 9 #include "cat.h" 10 #include "mkfifo.h" 11 #include "cp.h" 12 #include "hostname.h" 13 #include "sh.h" 14 #include "mknod.h" 15 #include "ps.h" 16 17 int (*(commands_exec[256]))()={ 18 ls_main, 19 true_main, 20 false_main, 21 rm_main, 22 whoami_main, 23 mount_main, 24 rmdir_main, 25 umount_main, 26 cat_main, 27 mkfifo_main, 28 cp_main, 29 hostname_main, 30 sh_main, 31 mknod_main, 32 ps_main, 33 NULL 34 }; 35 36 char *commands_name[256]={ 37 "ls", 38 "true", 39 "false", 40 "rm", 41 "whoami", 42 "mount", 43 "rmdir", 44 "umount", 45 "cat", 46 "mkfifo", 47 "cp", 48 "hostname", 49 "sh", 50 "mknod", 51 "ps", 52 NULL 53 }; |