Changes in kernel/generic/src/console/cmd.c [98000fb:cb3d641a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/cmd.c
r98000fb rcb3d641a 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_argv 422 }; 423 411 424 /* Data and methods for 'zone' command */ 412 425 static int cmd_zone(cmd_arg_t *argv); … … 459 472 &help_info, 460 473 &ipc_info, 474 &kill_info, 461 475 &set4_info, 462 476 &slabs_info, … … 848 862 * @return Always 1 849 863 */ 850 int cmd_slabs(cmd_arg_t * argv) { 864 int cmd_slabs(cmd_arg_t * argv) 865 { 851 866 slab_print_list(); 852 867 return 1; … … 860 875 * @return Always 1 861 876 */ 862 int cmd_threads(cmd_arg_t * argv) { 877 int cmd_threads(cmd_arg_t * argv) 878 { 863 879 thread_print_list(); 864 880 return 1; … … 871 887 * @return Always 1 872 888 */ 873 int cmd_tasks(cmd_arg_t * argv) { 889 int cmd_tasks(cmd_arg_t * argv) 890 { 874 891 task_print_list(); 875 892 return 1; … … 882 899 * @return Always 1 883 900 */ 884 int cmd_sched(cmd_arg_t * argv) { 901 int cmd_sched(cmd_arg_t * argv) 902 { 885 903 sched_print_list(); 886 904 return 1; … … 893 911 * return Always 1 894 912 */ 895 int cmd_zones(cmd_arg_t * argv) { 913 int cmd_zones(cmd_arg_t * argv) 914 { 896 915 zone_print_list(); 897 916 return 1; … … 904 923 * return Always 1 905 924 */ 906 int cmd_zone(cmd_arg_t * argv) { 925 int cmd_zone(cmd_arg_t * argv) 926 { 907 927 zone_print_one(argv[0].intval); 908 928 return 1; … … 915 935 * return Always 1 916 936 */ 917 int cmd_ipc(cmd_arg_t * argv) { 937 int cmd_ipc(cmd_arg_t * argv) 938 { 918 939 ipc_print_task(argv[0].intval); 919 940 return 1; 920 941 } 921 942 943 /** Command for killing a task 944 * 945 * @param argv Integer argument from cmdline expected 946 * 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 } 922 956 923 957 /** Command for listing processors.
Note:
See TracChangeset
for help on using the changeset viewer.