]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
build: fix output of pid values
authorMarc-André Lureau <marcandre.lureau@gmail.com>
Fri, 20 Apr 2012 13:13:51 +0000 (15:13 +0200)
committerEric Blake <eblake@redhat.com>
Wed, 2 May 2012 18:47:20 +0000 (12:47 -0600)
Fix a few more places where pid_t is printed with wrong type

src/conf/domain_audit.c
src/conf/domain_conf.c
src/util/command.c
src/util/virpidfile.c

index b885906462e649fc8ec0fa3aaf354bb074d17114..653657b115f43977d678326f7513316cd4752e90 100644 (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);
 }
index 184ff2391a7f88bc21e85cf65e4d72259ad751cf..3fce7e5aeaa10ec4d6ea20a7008016921f7d670e 100644 (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))
index 2837450e737919ff5be7ff4aee069246bc21a038..eaa9f167533b30871be20f7a6a5569d73ebf40d9 100644 (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
index 1934341e4ff69f72ded4e4820b571e56e396b13a..59d0c940336d9342f4d5b8b14b628dd597812bb9 100644 (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;
         }