From 94aa5bb1cfbc03344928e8cd55ecd5c54cce0088 Mon Sep 17 00:00:00 2001 From: "thestig@chromium.org" Date: Wed, 21 Oct 2009 22:09:33 +0000 Subject: Trim the lsb_release output in GetLinuxDistro. BUG=none TEST=With crash reporting enabled, renderer process command line doesn't have a trailing '?' in the --enable-crash-reporter switch value. Review URL: http://codereview.chromium.org/307027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29718 0039d316-1c4b-4281-b951-d872f2087c98 --- base/linux_util.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'base/linux_util.cc') diff --git a/base/linux_util.cc b/base/linux_util.cc index c3198f6..03254de 100644 --- a/base/linux_util.cc +++ b/base/linux_util.cc @@ -143,8 +143,10 @@ std::string GetLinuxDistro() { if (output.length() > 0) { // lsb_release -d should return: Description:Distro Info static const std::string field = "Description:\t"; - if (output.compare(0, field.length(), field) == 0) + if (output.compare(0, field.length(), field) == 0) { linux_distro = output.substr(field.length()); + TrimWhitespaceASCII(linux_distro, TRIM_ALL, &linux_distro); + } } distro_state_singleton->CheckFinished(); return linux_distro; -- cgit v1.1