This may be a dumb question, but when we implemented this, did we have to take a copy of the enum at all? Couldn't we have just built a ctype function for libbe/be_utils.c::be_err_to_str(), and then in the code here, whenever we need to map an error code, just call that to get a real error string to present to the user?

-ethan


On 12/29/11 12:54, Glenn Lagasse wrote:
* John Fischer ([email protected]) wrote:
Unfortunately, ctypes does not implement the Enumeration type.
It can be done by hand via c_int, however, I don't think that buys
us anything.
That's unfortunate, but I'm not sure it matters.  Currently
install_target has it's own be.py which contains some of the functions
of beadm/libbe (which imports const.py) which target uses.  When the
beadm/libbe rewrite is complete, that should go away I believe and
install_target would just consume the pure python beadm module directly
and not have to worry about these enums since target will be calling the
beadm interfaces directly and the enums/errors will be handled
internally to the beadm module.  At least that's my expectation.

Glenn
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to