>         /*
>          * Verify that the firmware major number matches.  Major number
>          * mismatches are fatal.  Minor number mismatches are tolerated.
>          */
>         if (ibv_read_sysfs_file(uverbs_sys_path, "ibdev",
>                                 ibdev, sizeof ibdev) < 0)
>                 return NULL;
>         memset(devstr, 0, sizeof devstr);
>         snprintf(devstr, sizeof devstr, "%s/class/infiniband/%s",
> ibv_get_sysfs_path(), ibdev);
>         if (ibv_read_sysfs_file(devstr, "fw_ver", value, sizeof value) < 0)
>                 return NULL;

looks fine assuming it works, although I'm a fan of asprintf() ;)

 - R.
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to