Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\debug\kdb\kdb_main.c Create Date:2022-07-28 11:40:58
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:kdb_defcmd2

Proto:static int kdb_defcmd2(const char *cmdstr, const char *argv0)

Type:int

Parameter:

TypeParameterName
const char *cmdstr
const char *argv0
676  s = defcmd_set + defcmd_set_count - 1
677  save_command = command
678  If strcmp(argv0, "endefcmd") == 0 Then
679  defcmd_in_progress = false
680  If Not count Then usable = false
682  If usable Then kdb_register_flags(name, Forward references , usage, help, 0, KDB_ENABLE_ALWAYS_SAFE)
690  Return 0
692  If Not usable Then Return KDB_NOTIMP
694  command = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
695  If Not command Then
696  kdb_printf("Could not allocate new kdb_defcmd table for %s\n", cmdstr)
698  usable = false
699  Return KDB_NOTIMP
701  No 3D Now!(command, save_command, count * size of *command )
702  command[count++] = kdb_strdup(cmdstr, GFP_KDB)
703  kfree(save_command)
704  Return 0
Caller
NameDescribe
kdb_defcmd
kdb_parse