X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lnet%2Flnet%2Fapi-ni.c;h=f7be1690abf61151a4e3f0cf49d2d280cfc1e32e;hp=c4d6e6c19baac7f4a7d2556ecbf7343c39fb3705;hb=82835a1952dcb37e8aac8c9d0666016557ea58e7;hpb=39745c8b5493159bbca62add54ca9be7cac6564f diff --git a/lnet/lnet/api-ni.c b/lnet/lnet/api-ni.c index c4d6e6c..f7be169 100644 --- a/lnet/lnet/api-ni.c +++ b/lnet/lnet/api-ni.c @@ -2753,9 +2753,9 @@ static int lnet_genl_parse_list(struct sk_buff *msg, list->lkl_maxattr); nla_put_u16(msg, LN_SCALAR_ATTR_INDEX, count); - if (props[count].lkp_values) + if (props[count].lkp_value) nla_put_string(msg, LN_SCALAR_ATTR_VALUE, - props[count].lkp_values); + props[count].lkp_value); if (props[count].lkp_key_format) nla_put_u16(msg, LN_SCALAR_ATTR_KEY_FORMAT, props[count].lkp_key_format); @@ -2767,13 +2767,14 @@ static int lnet_genl_parse_list(struct sk_buff *msg, rc = lnet_genl_parse_list(msg, data, ++idx); if (rc < 0) return rc; + idx = rc; } nla_nest_end(msg, key); } nla_nest_end(msg, node); - return 0; + return idx; } int lnet_genl_send_scalar_list(struct sk_buff *msg, u32 portid, u32 seq, @@ -2798,7 +2799,7 @@ int lnet_genl_send_scalar_list(struct sk_buff *msg, u32 portid, u32 seq, canceled: if (rc < 0) genlmsg_cancel(msg, hdr); - return rc; + return rc > 0 ? 0 : rc; } EXPORT_SYMBOL(lnet_genl_send_scalar_list);