From 2183a0862311cf2fbb82f61ecdcdf3816ce90040 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 3 Dec 2009 10:40:37 +0100 Subject: [PATCH] * apt-pkg/deb/dpkgpm.cc: - include df -l output in the apport log as well (thanks to tjaalton) --- apt-pkg/deb/dpkgpm.cc | 17 +++++++++++++++++ debian/changelog | 3 +++ 2 files changed, 20 insertions(+) diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 7daa55a58..500d4a260 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -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); } diff --git a/debian/changelog b/debian/changelog index 20bcf9bb9..0113fb95a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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: -- 2.45.2