Lines Matching refs:buf
319 char *buf;
340 buf = malloc(bufsize);
341 if (!buf) {
346 memset(buf, 0, bufsize);
348 uverbs_infop = UVERBS_INFO(buf);
435 free(buf);
440 free(buf);
466 char umad_devpath[MAX_OFS_DEVPATH_LEN], *buf;
493 buf = malloc(bufsize);
494 memset(buf, 0, bufsize);
495 umad_infop = (sol_umad_ioctl_info_t *)buf;
532 free(buf);
537 free(buf);
890 infiniband_verbs(char *path, char *buf, size_t size)
934 len = 1 + sprintf(buf, "0x%x",
937 len = 1 + sprintf(buf, "0x%x",
941 len = 1 + sprintf(buf, "%s", info_p->ibd_name);
943 len = 1 + sprintf(buf, "%d", info_p->ibd_abi_version);
953 len = 1 + sprintf(buf, "%d", uverbs_abi_version);
962 infiniband_ports(char *path, char *buf, size_t size, char *dev_name)
990 len = 1 + sprintf(buf,
1010 len = 1 + sprintf(buf, "0x%04x", pkeys[pkey_num]);
1020 len = 1 + sprintf(buf, "%d", port_attr.lmc);
1022 len = 1 + sprintf(buf, "0x%x", port_attr.sm_lid);
1024 len = 1 + sprintf(buf, "%d", port_attr.sm_sl);
1026 len = 1 + sprintf(buf, "0x%x", port_attr.lid);
1030 len = 1 + sprintf(buf, "%d: NOP",
1034 len = 1 + sprintf(buf, "%d: DOWN",
1038 len = 1 + sprintf(buf, "%d: INIT",
1042 len = 1 + sprintf(buf, "%d: ARMED",
1046 len = 1 + sprintf(buf, "%d: ACTIVE",
1050 len = 1 + sprintf(buf,
1055 len = 1 + sprintf(buf, "%d: INVALID",
1062 len = 1 + sprintf(buf, "%d: Sleep",
1066 len = 1 + sprintf(buf, "%d: Polling",
1070 len = 1 + sprintf(buf, "%d: Disabled",
1074 len = 1 + sprintf(buf,
1079 len = 1 + sprintf(buf, "%d: LinkUp",
1083 len = 1 + sprintf(buf,
1088 len = 1 + sprintf(buf,
1093 len = 1 + sprintf(buf, "%d: <unknown>",
1135 len = 1 + sprintf(buf, "%f", rate);
1137 len = 1 + sprintf(buf, "0x%08x",
1143 len = 1 + sprintf(buf, "%s", "IB");
1147 1 + sprintf(buf, "%s", "Ethernet");
1150 len = 1 + sprintf(buf, "%s", "Unknown");
1159 infiniband(char *path, char *buf, size_t size)
1171 len = infiniband_ports(path, buf, size, dev_name);
1173 len = 1 + sprintf(buf, "%d", IBV_NODE_CA);
1179 len = 1 + sprintf(buf, "%s", info->ibd_node_guid_str);
1181 len = 1 + sprintf(buf, "%s",
1184 len = 1 + sprintf(buf, "%s", info->ibd_sys_image_guid);
1186 len = 1 + sprintf(buf, "%s", info->ibd_fw_ver);
1188 len = 1 + sprintf(buf, "%d", info->ibd_hw_rev);
1190 len = 1 + sprintf(buf, "%s", info->ibd_devid_string);
1192 len = 1 + sprintf(buf, "%s", info->ibd_boardid_string);
1200 infiniband_mad(char *path, char *buf, size_t size)
1233 len = strlcpy(buf, umad_dev_cache[dev_num].umc_ib_dev,
1236 len = 1 + sprintf(buf, "%d",
1245 1 + sprintf(buf, "%d", umad_abi_version);
1252 * Return -1 on error, or the length of the data (buf) on success.
1255 sol_read_sysfs_file(char *path, char *buf, size_t size)
1282 len = infiniband_verbs(path, buf, size);
1284 len = infiniband(path, buf, size);
1286 len = infiniband_mad(path, buf, size);
1290 len = 1 + sprintf(buf, "%d",