Bug 1616195 - Improve the Linux distribution version information included in crash reports r=KrisWright

We previously only included the contents of the /etc/lsb-release file, however
this file is not present in RedHat-based distributions which use
/etc/os-release instead. This patch will read the latter if the former is not
present.

Differential Revision: https://phabricator.services.mozilla.com/D68986

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Gabriele Svelto 2020-03-31 15:57:15 +00:00
Родитель c262f6b170
Коммит 87ab689c3c
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -278,8 +278,10 @@ class MinidumpWriter {
dir.CopyIndex(dir_index++, &dirent);
dirent.stream_type = MD_LINUX_LSB_RELEASE;
if (!WriteFile(&dirent.location, "/etc/lsb-release"))
if (!WriteFile(&dirent.location, "/etc/lsb-release") &&
!WriteFile(&dirent.location, "/etc/os-release")) {
NullifyDirectoryEntry(&dirent);
}
dir.CopyIndex(dir_index++, &dirent);
dirent.stream_type = MD_LINUX_CMD_LINE;