From: Ben Pfaff Date: Thu, 5 May 2011 18:25:51 +0000 (-0700) Subject: stream-ssl: Log unexpected errors from 'stat'. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e68f6dea5404b9cb4c0d7f3501bf276af646a372;p=openvswitch stream-ssl: Log unexpected errors from 'stat'. A user report possibly implicates problems reading the mtime of the CA cert file. Until now, nothing has logged these errors. This commit adds such logging. NICS-9. --- diff --git a/lib/stream-ssl.c b/lib/stream-ssl.c index 6509b7ee..a93c0064 100644 --- a/lib/stream-ssl.c +++ b/lib/stream-ssl.c @@ -1067,6 +1067,7 @@ static bool update_ssl_config(struct ssl_config_file *config, const char *file_name) { struct timespec mtime; + int error; if (ssl_init() || !file_name) { return false; @@ -1074,7 +1075,10 @@ update_ssl_config(struct ssl_config_file *config, const char *file_name) /* If the file name hasn't changed and neither has the file contents, stop * here. */ - get_mtime(file_name, &mtime); + error = get_mtime(file_name, &mtime); + if (error && error != ENOENT) { + VLOG_ERR_RL(&rl, "%s: stat failed (%s)", file_name, strerror(error)); + } if (config->file_name && !strcmp(config->file_name, file_name) && mtime.tv_sec == config->mtime.tv_sec