]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/dpkgpm.cc
* fix problematic use of tolower() when calculating the version
[apt.git] / apt-pkg / deb / dpkgpm.cc
index d8c38427f57e8d9137e928b89dd616e4abd65edb..f57bff32cddbec34fa3402d4b2e5a3cce1e793fc 100644 (file)
@@ -1123,6 +1123,23 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg)
         fclose(log);
       }
    }
+
+   // attach dmesg log (to learn about segfaults)
+   if (FileExists("/bin/dmesg"))
+   {
+      FILE *log = NULL;
+      char buf[1024];
+
+      fprintf(report, "Dmesg:\n");
+      log = popen("/bin/dmesg","r");
+      if(log != NULL)
+      {
+        while( fgets(buf, sizeof(buf), log) != NULL)
+           fprintf(report, " %s", buf);
+        fclose(log);
+      }
+   }
    fclose(report);
+
 }
                                                                        /*}}}*/