Skip to contentSkip to conversation

how does variable num define for errno in libxc

DISCUSSION tgh 4 participants 6 messages Mar 19, 2008 – Mar 20, 2008

lore
Share & tools
lore

tgh

author
#0 lore raw

hi
i try to modify code of xc_domain_save.c
and there is error, comes out from ERROR("Error when writing to state file (5)" " (errno %d)", errno);
i am confused about where is the errno defined ,and what does variable num mean? say errno=104 or errno=26 or some else

Thanks

#1 lore raw
Quoted 6 lines · tgh

hi
i try to modify code of xc_domain_save.c
and there is error, comes out from ERROR("Error when writing to state file (5)" " (errno %d)", errno);
i am confused about where is the errno defined ,and what does variable num mean? say errno=104 or errno=26 or some else

Error numbers are a C library feature. If you're running Linux, check whether you have installed the base development manual pages and try 'man errno'. Or see a good book on C programming.

good luck,
Daniel

Signature · 5 lines
Daniel Stodden
LRR     -      Lehrstuhl für Rechnertechnik und Rechnerorganisation
Institut für Informatik der TU München             D-85748 Garching
http://www.lrr.in.tum.de/~stodden         mailto:[email protected]
PGP Fingerprint: F5A4 1575 4C56 E26A 0B33  3D80 457E 82AE B0D8 735B
#2 lore raw

Thank you
and man errno ,there is no match or map between num,say 104 and consist ,say EBADMSG, or maybe some book more helpful

another question
i am confused about how to use shadow mechanism ,that is, when live migration, after shutdown VM,and XEN_DOMCTL_SHADOW_OP_CLEAN, how to make VM

remain in shadow mode XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY? i have modified the code to try to make it as follows
if ( !(xc_shadow_control(xc_handle, dom,
XEN_DOMCTL_SHADOW_OP_OFF,

                                    NULL, 0, NULL, 0, NULL) >= 0 &&
                  xc_shadow_control(xc_handle, dom,
                                    XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY,
                                    NULL, 0, NULL, 0, NULL) >= 0) )

but it seems not to work , and how to do it ,or any help

Thanks

Quoted 18 lines · Daniel Stodden
Quoted 7 lines · tgh

hi
i try to modify code of xc_domain_save.c
and there is error, comes out from ERROR("Error when writing to state file (5)" " (errno %d)", errno);
i am confused about where is the errno defined ,and what does variable num mean? say errno=104 or errno=26 or some else

Error numbers are a C library feature. If you're running Linux, check whether you have installed the base development manual pages and try 'man errno'. Or see a good book on C programming.

good luck,
Daniel

#3 lore raw
Quoted 3 lines · tgh

Thank you
and man errno ,there is no match or map between num,say 104 and
consist ,say EBADMSG, or maybe some book more helpful

find /usr/include -name errno.h | xargs grep 104

Quoted 8 lines

another question
i am confused about how to use shadow mechanism ,that is, when live
migration, after shutdown VM,and XEN_DOMCTL_SHADOW_OP_CLEAN, how to make VM

remain in shadow mode XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY? i have
modified the code to try to make it as follows
if ( !(xc_shadow_control(xc_handle, dom,
XEN_DOMCTL_SHADOW_OP_OFF,

Quoted 6 lines
                                     NULL, 0, NULL, 0, NULL) >= 0 &&
                   xc_shadow_control(xc_handle, dom,
                                     XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY,
                                     NULL, 0, NULL, 0, NULL) >= 0) )

but it seems not to work , and how to do it ,or any help

Didn't look at this code for a while. no immediate idea, sorry.

regards,
Daniel

Signature · 5 lines
Daniel Stodden
LRR     -      Lehrstuhl für Rechnertechnik und Rechnerorganisation
Institut für Informatik der TU München             D-85748 Garching
http://www.lrr.in.tum.de/~stodden         mailto:[email protected]
PGP Fingerprint: F5A4 1575 4C56 E26A 0B33  3D80 457E 82AE B0D8 735B
#4 lore raw
Quoted 11 lines · Daniel Stodden
Quoted 11 lines

another question
i am confused about how to use shadow mechanism ,that is, when live
migration, after shutdown VM,and XEN_DOMCTL_SHADOW_OP_CLEAN, how to make VM
remain in shadow mode XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY? i have
modified the code to try to make it as follows
if ( !(xc_shadow_control(xc_handle, dom,
XEN_DOMCTL_SHADOW_OP_OFF,

                                     NULL, 0, NULL, 0, NULL) >= 0 &&
                   xc_shadow_control(xc_handle, dom,
                                     XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY,
                                     NULL, 0, NULL, 0, NULL) >= 0) )

If the domain is already in shadow log-dirty mode, and you want it to remain in shadow log-dirty mode, surely you don't need to do anything at all?

Cheers,

Tim.

Signature · 3 lines
Tim Deegan <[email protected]>
Principal Software Engineer, Citrix Systems (R&D) Ltd.
[Company #02300071, SL9 0DZ, UK.]