From 4e5356169ac2ef7f22e5a101d86009f706b0ff7b Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Wed, 1 Jul 2015 14:49:15 +0100 Subject: bootchart: do not report warning when disk is missing model. In VMs / virtio drives there is no model. Also don't print "Disk: (null)" in output if no model is available. --- src/bootchart/svg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/bootchart/svg.c') diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c index 0ac1f55a91..a7ef653d5d 100644 --- a/src/bootchart/svg.c +++ b/src/bootchart/svg.c @@ -172,7 +172,7 @@ static int svg_title(FILE *of, const char *build, int pscount, double log_start, r = read_one_line_file(filename, &model); if (r < 0) - log_warning("Error reading disk model for %s: %m\n", rootbdev); + log_info("Error reading disk model for %s: %m\n", rootbdev); } /* various utsname parameters */ @@ -208,7 +208,8 @@ static int svg_title(FILE *of, const char *build, int pscount, double log_start, fprintf(of, "System: %s %s %s %s\n", uts.sysname, uts.release, uts.version, uts.machine); fprintf(of, "CPU: %s\n", cpu); - fprintf(of, "Disk: %s\n", model); + if (model) + fprintf(of, "Disk: %s\n", model); fprintf(of, "Boot options: %s\n", cmdline); fprintf(of, "Build: %s\n", build); fprintf(of, "Log start time: %.03fs\n", log_start); -- cgit v1.2.3-54-g00ecf