diff options
author | Michael Biebl <biebl@debian.org> | 2010-12-21 03:07:36 +0100 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2010-12-21 03:07:36 +0100 |
commit | 22927a3654915670c6d2c7f2e60ea5f54cd2503d (patch) | |
tree | 032a0813afa1d832517c3fb82c198550a074aee1 | |
parent | 01c3a63e179ae7abb7447570a82087289d1bcab4 (diff) |
debian: Prefix welcome string with "Debian "
For stable releases /etc/debian_version only contains a version number,
so we add a prefix "Debian ".
-rw-r--r-- | src/util.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/util.c b/src/util.c index 0cd78f6561..d12b5e772d 100644 --- a/src/util.c +++ b/src/util.c @@ -3047,12 +3047,16 @@ void status_welcome(void) { #elif defined(TARGET_DEBIAN) if (!pretty_name) { - if ((r = read_one_line_file("/etc/debian_version", &pretty_name)) < 0) { + char *version; + if ((r = read_one_line_file("/etc/debian_version", &version)) < 0) { if (r != -ENOENT) log_warning("Failed to read /etc/debian_version: %s", strerror(-r)); - } else - truncate_nl(pretty_name); + } else { + truncate_nl(version); + pretty_name = strappend("Debian ", version); + free(version); + } } if (!ansi_color) |