Просмотр исходного кода

* apt-pkg/deb/dpkgpm.cc:
- include df -l output in the apport log as well (thanks to
tjaalton)

Michael Vogt лет назад: 17
Родитель
Сommit
2183a08623
2 измененных файлов с 20 добавлено и 0 удалено
  1. 17 0
      apt-pkg/deb/dpkgpm.cc
  2. 3 0
      debian/changelog

+ 17 - 0
apt-pkg/deb/dpkgpm.cc

@@ -1243,6 +1243,23 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg)
 	 fclose(log);
 	 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);
    fclose(report);
 
 
 }
 }

+ 3 - 0
debian/changelog

@@ -6,6 +6,9 @@ apt (0.7.24ubuntu1) UNRELEASED; urgency=low
       triggers-pending state. dpkg will deal with the trigger and
       triggers-pending state. dpkg will deal with the trigger and
       it if does it before we trigger it, dpkg will error out
       it if does it before we trigger it, dpkg will error out
       (LP: #414631)
       (LP: #414631)
+  * apt-pkg/deb/dpkgpm.cc:
+    - include df -l output in the apport log as well (thanks to
+      tjaalton)
 
 
   [ Matt Zimmerman ]
   [ Matt Zimmerman ]
   * apt-pkg/deb/dpkgpm.cc:
   * apt-pkg/deb/dpkgpm.cc: