- lcfg = (struct lustre_cfg* ) buf;
-
- CDEBUG(D_INFO, "lcfg command: 0x%x\n", lcfg->lcfg_command);
- if (lcfg->lcfg_dev_name)
- CDEBUG(D_INFO, " devname: %s\n",
- lcfg->lcfg_dev_name);
- if (lcfg->lcfg_flags)
- CDEBUG(D_INFO, " flags: 0x%x\n", lcfg->lcfg_flags);
- if (lcfg->lcfg_nid)
- CDEBUG(D_INFO, " nid: "LPX64"\n",
- lcfg->lcfg_nid);
- if (lcfg->lcfg_nal)
- CDEBUG(D_INFO, " nal: %x\n", lcfg->lcfg_nal);
- if (lcfg->lcfg_num)
- CDEBUG(D_INFO, " nal: %x\n", lcfg->lcfg_num);
- if (lcfg->lcfg_inlbuf1)
- CDEBUG(D_INFO, " inlbuf1: %s\n",lcfg->lcfg_inlbuf1);
- if (lcfg->lcfg_inlbuf2)
- CDEBUG(D_INFO, " inlbuf2: %s\n",lcfg->lcfg_inlbuf2);
- if (lcfg->lcfg_inlbuf3)
- CDEBUG(D_INFO, " inlbuf3: %s\n",lcfg->lcfg_inlbuf3);
- if (lcfg->lcfg_inlbuf4)
- CDEBUG(D_INFO, " inlbuf4: %s\n",lcfg->lcfg_inlbuf4);
- if (lcfg->lcfg_inlbuf5)
- CDEBUG(D_INFO, " inlbuf5: %s\n",lcfg->lcfg_inlbuf5);
- if (lcfg->lcfg_inlbuf6)
- CDEBUG(D_INFO, " inlbuf6: %s\n",lcfg->lcfg_inlbuf6);
-
- lustre_cfg_freedata(buf, cfg_len);
- } else if (rec->lrh_type == PTL_CFG_REC) {
- struct portals_cfg *pcfg = (struct portals_cfg *)cfg_buf;
-
- CDEBUG(D_INFO, "pcfg command: 0x%x\n", pcfg->pcfg_command);
- if (pcfg->pcfg_nal)
- CDEBUG(D_INFO, " nal: %d\n",
- pcfg->pcfg_nal);
- if (pcfg->pcfg_gw_nal)
- CDEBUG(D_INFO, " gw_nal: %d\n",
- pcfg->pcfg_gw_nal);
- if (pcfg->pcfg_nid)
- CDEBUG(D_INFO, " nid: "LPX64"\n",
- pcfg->pcfg_nid);
- if (pcfg->pcfg_nid2)
- CDEBUG(D_INFO, " nid2: "LPX64"\n",
- pcfg->pcfg_nid2);
- if (pcfg->pcfg_nid3)
- CDEBUG(D_INFO, " nid3: "LPX64"\n",
- pcfg->pcfg_nid3);
- if (pcfg->pcfg_misc)
- CDEBUG(D_INFO, " misc: %d\n",
- pcfg->pcfg_misc);
- if (pcfg->pcfg_id)
- CDEBUG(D_INFO, " id: 0x%x\n",
- pcfg->pcfg_id);
- if (pcfg->pcfg_flags)
- CDEBUG(D_INFO, " flags: 0x%x\n",
- pcfg->pcfg_flags);
+ lcfg = (struct lustre_cfg *)cfg_buf;
+
+ ptr += snprintf(ptr, end-ptr, "cmd=%05x ",
+ lcfg->lcfg_command);
+ if (lcfg->lcfg_flags) {
+ ptr += snprintf(ptr, end-ptr, "flags=%#08x ",
+ lcfg->lcfg_flags);
+ }
+ if (lcfg->lcfg_num) {
+ ptr += snprintf(ptr, end-ptr, "num=%#08x ",
+ lcfg->lcfg_num);
+ }
+ if (lcfg->lcfg_nid) {
+ ptr += snprintf(ptr, end-ptr, "nid=%s("LPX64")\n ",
+ libcfs_nid2str(lcfg->lcfg_nid),
+ lcfg->lcfg_nid);
+ }
+ if (lcfg->lcfg_command == LCFG_MARKER) {
+ struct cfg_marker *marker = lustre_cfg_buf(lcfg, 1);
+ ptr += snprintf(ptr, end-ptr, "marker=%d(%#x)%s '%s'",
+ marker->cm_step, marker->cm_flags,
+ marker->cm_tgtname, marker->cm_comment);
+ } else {
+ for (i = 0; i < lcfg->lcfg_bufcount; i++) {
+ ptr += snprintf(ptr, end-ptr, "%d:%s ", i,
+ lustre_cfg_string(lcfg, i));
+ }
+ }
+ LCONSOLE(D_WARNING, " %s\n", outstr);