chetansa wrote:
Hi all,
I would like to know if I am doing something wrong in my test code (using libxen). Here is the test code snippet and associated results.

    ---- Code -----

        xen_sr_set *mySrList;
        xen_sr *mySr;
if (!xen_sr_get_all(session, &mySrList))
        {
            cout<<"Error in xen_sr_get_all"<<endl;
            return 1;
        }
        cout<<"SR array size:"<<(int)mySrList->size<<endl;
mySr = mySrList->contents[0]; char* srname;

        if (!xen_sr_get_type(session, &srname, (mySrList->contents[0])))
        {
            cout<<"Error in xen_sr_get_type"<<endl;
            return 1;
        }
cout<<"SR type:"<<srname<<endl;

        int64_t srno;
if (!xen_sr_get_physical_size(session, &srno,
    (mySrList->contents[0])))
        {
            cout<<"Error in xen_sr_get_physical_size"<<endl;
            return 1;
        }
cout<<"SR detail:"<<(int)srno<<endl;

    ---- Results -----

    *SR array size: 2
    SR type: local
    Error in xen_sr_get_physical_size
    *

Thanks

Chetan
Here is an error description given by the session struct,

*2INTERNAL_ERROR 'int' object is not callable *

_______________________________________________
xen-api mailing list
[email protected]
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api

Reply via email to