[netcf-devel] Break out driver utility functions

Jonas Eriksson jonas.j.eriksson at ericsson.com
Fri Jul 17 15:32:41 UTC 2009


Hi,

First of, sorry for my absence on this list. When the others leave for
vacation, the work load apparently increases for the ones that do not :)
Also, thanks for all your input earlier, David.

This is my first effort to divide utility functions into
OS-independent (dutil.c) and OS-dependent (dutil_linux.c) and move
them out of the drivers.

It is noteworthy that the 4th test (testDefineUndefine) started
failing after I added the 2nd patch. After some debugging, this seems
to be due to augeas trying to save /sys/class/net/br0/address, which I
thought was kind of strange. I attached gdb and set breakpoints on
aug_set, aug_rm, aug_mv and aug_insert but was unable to find any call
that changed /files/sys/class/net/br0/address. Does someone else
experience the same problem, or is there something wrong with my
libaugeas build?

For my future projects, besides adapting the suse-driver according to
Davids suggestions and this commit, I am thinking about adding debug
macros (as mentioned) and improve error reporting. I would like to get
some opinions on this suggestion:
When I was debugging the problem above with aug_save, it was quite
hard to get exact error messages from augeas. I of course added
temporary debuging code that gave me this information, although augeas
information ought to be more easily accessible than this. I therefore
suggest adding a EAUGEAS or similar that would trigger a dump of
/augeas//error and /augeas//error/message from ERR_*.

Regards,
Jonas



More information about the netcf-devel mailing list