dovecot-1.1: dovecot -n/-a: Look up distros only if the sysname ...
    dovecot at dovecot.org 
    dovecot at dovecot.org
       
    Wed Oct 29 20:13:33 EET 2008
    
    
  
details:   http://hg.dovecot.org/dovecot-1.1/rev/f40e77bcf180
changeset: 7982:f40e77bcf180
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Oct 29 20:13:28 2008 +0200
description:
dovecot -n/-a: Look up distros only if the sysname is Linux.
diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
src/master/sysinfo-get.c |    7 ++++---
diffs (32 lines):
diff -r 9c3fa81a721d -r f40e77bcf180 src/master/sysinfo-get.c
--- a/src/master/sysinfo-get.c	Wed Oct 29 20:01:11 2008 +0200
+++ b/src/master/sysinfo-get.c	Wed Oct 29 20:13:28 2008 +0200
@@ -76,7 +76,7 @@ static const char *distro_get(void)
 					   NULL);
 		}
 	}
-	return "Unknown";
+	return "";
 }
 
 static const char *filesystem_get(const char *mail_location)
@@ -98,7 +98,7 @@ static const char *filesystem_get(const 
 
 const char *sysinfo_get(const char *mail_location)
 {
-	const char *distro, *fs, *uname_info = "";
+	const char *distro = "", *fs, *uname_info = "";
 #ifdef HAVE_SYS_UTSNAME_H
 	struct utsname u;
 
@@ -108,8 +108,9 @@ const char *sysinfo_get(const char *mail
 		uname_info = t_strdup_printf("%s %s %s",
 					     u.sysname, u.release, u.machine);
 	}
+	if (strcmp(u.sysname, "Linux") == 0)
+		distro = distro_get();
 #endif
-	distro = distro_get();
 	fs = filesystem_get(mail_location);
 	if (*uname_info == '\0' && *distro == '\0' && *fs == '\0')
 		return "";
    
    
More information about the dovecot-cvs
mailing list