[openib-general] where can i find functions that "convert" enumerated values to st ring?

Dotan Barak dotanb at mellanox.co.il
Tue Jul 19 07:04:52 PDT 2005


does the gen2 driver have functions that convert enumerated values to
strings?

for example, something like this:

static const char *atomic_cap_str(enum ibv_atomic_cap atom_cap)
{
        switch (atom_cap) {
        case IBV_ATOMIC_NONE:
                return "ATOMIC_NONE";
        case IBV_ATOMIC_HCA:
                return "ATOMIC_HCA";
        case IBV_ATOMIC_GLOB:
                return "ATOMIC_GLOB";
        default:
                return "Illegal atomic capability";
        }
}


Dotan Barak
Software Verification Engineer
Mellanox Technologies LTD
mailto:dotanb at mellanox.co.il
Tel: +972-4-9097200 Ext: 231 Fax: +972-4-9593245
P.O. Box 86 Yokneam 20692 ISRAEL.
Home: +972-4-8289408  Cell: 052-4222383

[ May the fork be with you ]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20050719/94b00aa0/attachment.html>


More information about the general mailing list