OpenSolaris

Printable Version Enter a New Search
Bug ID 6740207
Synopsis topo_method_call() needs to zero errno
State 10-Fix Delivered (Fix available in build)
Category:Subcategory library:fm
Keywords
Responsible Engineer Eric Schrock
Reported Against
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_98
Fixed In snv_98
Release Fixed solaris_nevada(snv_98)
Related Bugs
Submit Date 22-August-2008
Last Update Date 10-September-2008
Description
In topo_method_call(), we have:

                topo_method_enter(mp);
                if ((rc = mp->tim_func(mp->tim_mod, node, version, in, out))
                    < 0) {
                        if (mp->tim_mod->tm_errno == 0)
                                *err = ETOPO_METHOD_FAIL;
                        else
                                *err = mp->tim_mod->tm_errno;
                }
                topo_method_exit(mp);

The intent is that if the function didn't set 'tm_errno', we translate
this into ETOPO_METHOD_FAIL.  But we don't zero the errno beforehand,
so we can end up with whatever the last module error happened to be.
Work Around
N/A
Comments
N/A