On 4/6/11 3:02 PM, Jesse Butler wrote:
Ok, I have looked at some of your ctypes interfaces. Specifically, everything 
except libefi and libnvpair, per your suggestion, and libdiskmgt, because it is 
big and I haven't gotten to it yet. I will do so hopefully sometime in the next 
day or so. For now...

Totally awesome.   Thank you very much for looking!


libadm:
    cfunc.py
        for both read_extvtoc and write_extvtoc, i think you have a
        double pointer, where you require a single.

        more explicitly,  in extvtocp, you already have a
        C.POINTER(extvtoc), so C.POINTER(extvtocp) is a **extvtoc,
        where you require a *extvtoc.

Yeah. I just noticed that today. What shocks me is that it seemed to work with a double POINTER. Skynet has become self-aware!


        interesting that you have the correct arg for the underlying
        C library in extvtoc.py... I'd have thought the interpreter
        should bark at that, since it doesn't match your cfunc.py, but no?

libbe:
    cfunc.py
        nit - for clarity's sake, it might be good to simply use
        'BENodeListp' when you have a single pointer to BENodeList. It
        may cause confusion comparing, say, C.POINTER(BENodeListp) and
        C.POINTER(BENodeList), where you could just use BENodeListp in the
        latter.

Totally agree.  Fixed.


libdevinfo:
    devinfo.py:
        admittedly paranoid, however... I'm concerned with running a
        re.split on a line that is not guaranteed to contain the re.
        we'll bomb there if not, right? Of course, this takes a
        failure of a library call that should not fail... do what you
        will :)


I tested this to make sure it would be sane:

>>> import re
>>> re.split("[sp]", "abcdefg")
['abcdefg']
>>> "abcdefg".split("s")
['abcdefg']
>>> "abcdefg".split("p")
['abcdefg']
>>>


No matter what happens we always get a list of at least 1 entry, which I always use as result[0], which should always work.


Also, I just looked at vdevs.py in passing...  I'm concerned that if your 
handle initialization code fails, you'll simply bomb out. should you check for 
return, rather than ignoring the returns from init, open and get_config? I 
know, unlikely they'd fail, but if they did...

Fixed and confirmed with you offline.

Thanks again, Jesse!

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

Reply via email to