summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-12-03 10:40:37 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2009-12-03 10:40:37 +0100
commit2183a0862311cf2fbb82f61ecdcdf3816ce90040 (patch)
tree39e4aaac941286264e3e60af983752af27853ae0 /apt-pkg
parentfae49a716142b87ac6f6cdcc8e11d2d323ba615f (diff)
* apt-pkg/deb/dpkgpm.cc:
- include df -l output in the apport log as well (thanks to tjaalton)
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/dpkgpm.cc17
1 files changed, 17 insertions, 0 deletions
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);
}