1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-13 17:18:01 +03:00

build: fix output of pid values

Fix a few more places where pid_t is printed with wrong type
This commit is contained in:
Marc-André Lureau 2012-04-20 15:13:51 +02:00 committed by Eric Blake
parent 93b21be929
commit ca1bf4bd74
4 changed files with 6 additions and 6 deletions

View File

@ -562,8 +562,8 @@ virDomainAuditLifecycle(virDomainObjPtr vm, const char *op,
}
VIR_AUDIT(VIR_AUDIT_RECORD_MACHINE_CONTROL, success,
"virt=%s op=%s reason=%s %s uuid=%s vm-pid=%d",
virt, op, reason, vmname, uuidstr, vm->pid);
"virt=%s op=%s reason=%s %s uuid=%s vm-pid=%lld",
virt, op, reason, vmname, uuidstr, (long long)vm->pid);
VIR_FREE(vmname);
}

View File

@ -12832,10 +12832,10 @@ static char *virDomainObjFormat(virCapsPtr caps,
int i;
state = virDomainObjGetState(obj, &reason);
virBufferAsprintf(&buf, "<domstatus state='%s' reason='%s' pid='%d'>\n",
virBufferAsprintf(&buf, "<domstatus state='%s' reason='%s' pid='%lld'>\n",
virDomainStateTypeToString(state),
virDomainStateReasonToString(state, reason),
obj->pid);
(long long)obj->pid);
for (i = 0 ; i < VIR_DOMAIN_TAINT_LAST ; i++) {
if (obj->taint & (1 << i))

View File

@ -2399,7 +2399,7 @@ void
virPidAbort(pid_t pid)
{
/* Not yet ported to mingw. Any volunteers? */
VIR_DEBUG("failed to reap child %d, abandoning it", pid);
VIR_DEBUG("failed to reap child %lld, abandoning it", (long long)pid);
}
void

View File

@ -222,7 +222,7 @@ int virPidFileReadPathIfAlive(const char *path,
#endif
if (binpath) {
if (virAsprintf(&procpath, "/proc/%d/exe", *pid) < 0) {
if (virAsprintf(&procpath, "/proc/%lld/exe", (long long)*pid) < 0) {
*pid = -1;
return -1;
}