Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 2a75302 in mainline


Ignore:
Timestamp:
2009-11-01T11:32:51Z (11 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
095b1534
Parents:
49647be
Message:

Add Kconsole kill command.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/console/cmd.c

    r49647be r2a75302  
    409409};
    410410
     411/* Data and methods for 'kill' command */
     412static int cmd_kill(cmd_arg_t *argv);
     413static cmd_arg_t kill_argv = {
     414        .type = ARG_TYPE_INT,
     415};
     416static 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
    411424/* Data and methods for 'zone' command */
    412425static int cmd_zone(cmd_arg_t *argv);
     
    459472        &help_info,
    460473        &ipc_info,
     474        &kill_info,
    461475        &set4_info,
    462476        &slabs_info,
     
    920934}
    921935
     936/** Command for printing task ipc details
     937 *
     938 * @param argv Integer argument from cmdline expected
     939 *
     940 * return Always 1
     941 */
     942int cmd_kill(cmd_arg_t * argv)
     943{
     944        if (task_kill(argv[0].intval) != EOK)
     945                return 0;
     946
     947        return 1;
     948}
    922949
    923950/** Command for listing processors.
Note: See TracChangeset for help on using the changeset viewer.