Changes in kernel/generic/src/console/cmd.c [cb3d641a:98000fb] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/cmd.c
rcb3d641a r98000fb 409 409 }; 410 410 411 /* Data and methods for 'kill' command */412 static int cmd_kill(cmd_arg_t *argv);413 static cmd_arg_t kill_argv = {414 .type = ARG_TYPE_INT,415 };416 static cmd_info_t kill_info = {417 .name = "kill",418 .description = "kill <taskid> Kill a task.",419 .func = cmd_kill,420 .argc = 1,421 .argv = &kill_argv422 };423 424 411 /* Data and methods for 'zone' command */ 425 412 static int cmd_zone(cmd_arg_t *argv); … … 472 459 &help_info, 473 460 &ipc_info, 474 &kill_info,475 461 &set4_info, 476 462 &slabs_info, … … 862 848 * @return Always 1 863 849 */ 864 int cmd_slabs(cmd_arg_t * argv) 865 { 850 int cmd_slabs(cmd_arg_t * argv) { 866 851 slab_print_list(); 867 852 return 1; … … 875 860 * @return Always 1 876 861 */ 877 int cmd_threads(cmd_arg_t * argv) 878 { 862 int cmd_threads(cmd_arg_t * argv) { 879 863 thread_print_list(); 880 864 return 1; … … 887 871 * @return Always 1 888 872 */ 889 int cmd_tasks(cmd_arg_t * argv) 890 { 873 int cmd_tasks(cmd_arg_t * argv) { 891 874 task_print_list(); 892 875 return 1; … … 899 882 * @return Always 1 900 883 */ 901 int cmd_sched(cmd_arg_t * argv) 902 { 884 int cmd_sched(cmd_arg_t * argv) { 903 885 sched_print_list(); 904 886 return 1; … … 911 893 * return Always 1 912 894 */ 913 int cmd_zones(cmd_arg_t * argv) 914 { 895 int cmd_zones(cmd_arg_t * argv) { 915 896 zone_print_list(); 916 897 return 1; … … 923 904 * return Always 1 924 905 */ 925 int cmd_zone(cmd_arg_t * argv) 926 { 906 int cmd_zone(cmd_arg_t * argv) { 927 907 zone_print_one(argv[0].intval); 928 908 return 1; … … 935 915 * return Always 1 936 916 */ 937 int cmd_ipc(cmd_arg_t * argv) 938 { 917 int cmd_ipc(cmd_arg_t * argv) { 939 918 ipc_print_task(argv[0].intval); 940 919 return 1; 941 920 } 942 921 943 /** Command for killing a task944 *945 * @param argv Integer argument from cmdline expected946 *947 * return 0 on failure, 1 on success.948 */949 int cmd_kill(cmd_arg_t * argv)950 {951 if (task_kill(argv[0].intval) != EOK)952 return 0;953 954 return 1;955 }956 922 957 923 /** Command for listing processors.
Note:
See TracChangeset
for help on using the changeset viewer.