diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-04-03 22:44:42 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-04-03 22:44:42 +0200 |
| commit | 16208b172535662820bfda9e1d1fb1e75e704f4e (patch) | |
| tree | 16507a7b7bae4485a13d03f82b732594f752f127 /src/lib/cross_linux.cc | |
| parent | 1f24df1a4265040443109a982acb88de5849ccb8 (diff) | |
Move Drive::description into its own file and fix missing name when vendor is empty.
Diffstat (limited to 'src/lib/cross_linux.cc')
| -rw-r--r-- | src/lib/cross_linux.cc | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/lib/cross_linux.cc b/src/lib/cross_linux.cc index bf319bcac..406087917 100644 --- a/src/lib/cross_linux.cc +++ b/src/lib/cross_linux.cc @@ -309,28 +309,6 @@ get_drives () return drives; } -string -Drive::description () const -{ - char gb[64]; - snprintf(gb, 64, "%.1f", _size / 1000000000.0); - - string name; - if (_vendor) { - name += *_vendor; - } - if (_model) { - if (name.size() > 0) { - name += " " + *_model; - } - } - if (name.size() == 0) { - name = _("Unknown"); - } - - return String::compose("%1 (%2 GB) [%3]", name, gb, _internal_name); -} - void unprivileged () { |
