X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lnet%2Futils%2Flnetconfig%2Fliblnetconfig.c;h=2515a02de06f363aa02d2b2019c220a5108a5f15;hp=dc27874fc8e812ea04e43205f2c42616f3b44cf8;hb=9affdff656353bb31f22baeccd405bd8066914bc;hpb=f4e3a8239c520606032aa38f7c114cd9600385f3 diff --git a/lnet/utils/lnetconfig/liblnetconfig.c b/lnet/utils/lnetconfig/liblnetconfig.c index dc27874..2515a02 100644 --- a/lnet/utils/lnetconfig/liblnetconfig.c +++ b/lnet/utils/lnetconfig/liblnetconfig.c @@ -3158,46 +3158,3 @@ int lustre_yaml_show(char *f, struct cYAML **show_rc, struct cYAML **err_rc) show_rc, err_rc); } -int lustre_lnet_send_dbg_task(enum lnet_dbg_task dbg_task, - struct lnet_dbg_task_info *dbg_info, - struct cYAML **show_rc, - struct cYAML **err_rc) -{ - struct lnet_ioctl_dbg *dbg; - struct lnet_dbg_task_info *info; - int rc = LUSTRE_CFG_RC_NO_ERR; - char err_str[LNET_MAX_STR_LEN]; - - snprintf(err_str, sizeof(err_str), "\"success\""); - - dbg = calloc(1, sizeof(*dbg) + sizeof(*info)); - if (!dbg) { - snprintf(err_str, sizeof(err_str), "\"out of memory\""); - rc = LUSTRE_CFG_RC_OUT_OF_MEM; - goto out; - } - - info = (struct lnet_dbg_task_info *)dbg->dbg_bulk; - - LIBCFS_IOC_INIT_V2(*dbg, dbg_hdr); - - dbg->dbg_task = dbg_task; - if (dbg_info) - memcpy(info, dbg_info, sizeof(*info)); - - rc = l_ioctl(LNET_DEV_ID, IOC_LIBCFS_DBG, dbg); - if (rc != 0) { - rc = -errno; - snprintf(err_str, - sizeof(err_str), - "\"debug task failed %s\"", strerror(errno)); - goto out; - } - -out: - cYAML_build_error(rc, -1, DBG_CMD, - "debug", err_str, err_rc); - - return rc; -} -