]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/deb/dpkgpm.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Thu, 3 Dec 2009 09:40:37 +0000 (10:40 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Thu, 3 Dec 2009 09:40:37 +0000 (10:40 +0100)
  - include df -l output in the apport log as well (thanks to
    tjaalton)

apt-pkg/deb/dpkgpm.cc
debian/changelog

index 7daa55a583005cc5a15fccb8d762e501d98f2bab..500d4a260b1e1f24f87befdc701325c539e7ffc3 100644 (file)
@@ -1243,6 +1243,23 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg)
         fclose(log);
       }
    }
+
+   // attach df -l log (to learn about filesystem status)
+   if (FileExists("/bin/df"))
+   {
+      FILE *log = NULL;
+      char buf[1024];
+
+      fprintf(report, "Df:\n");
+      log = popen("/bin/df -l","r");
+      if(log != NULL)
+      {
+        while( fgets(buf, sizeof(buf), log) != NULL)
+           fprintf(report, " %s", buf);
+        fclose(log);
+      }
+   }
+
    fclose(report);
 
 }
index 20bcf9bb976cd381be9c9afb76c12d0d35798bbd..0113fb95a9db6ef37bb6b283175aa078c6a4b17e 100644 (file)
@@ -6,6 +6,9 @@ apt (0.7.24ubuntu1) UNRELEASED; urgency=low
       triggers-pending state. dpkg will deal with the trigger and
       it if does it before we trigger it, dpkg will error out
       (LP: #414631)
+  * apt-pkg/deb/dpkgpm.cc:
+    - include df -l output in the apport log as well (thanks to
+      tjaalton)
 
   [ Matt Zimmerman ]
   * apt-pkg/deb/dpkgpm.cc: