From: Ian Jackson Subject: Re: [PATCH] xl: Don't require a config file for cpupools Date: Mon, 23 Apr 2012 16:25:16 +0100 Message-ID: <20373.29788.772445.467842@mariner.uk.xensource.com> References: <0fb728d56baeaed476d2.1333477788@kodo2> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <0fb728d56baeaed476d2.1333477788@kodo2> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org George Dunlap writes ("[Xen-devel] [PATCH] xl: Don't require a config file for cpupools"): > Since the key information can be fairly simply put on the command-line, > there's no need to require an actual config file. Thanks. Just a few tiny coding style nits. I agree with Ian Campbell's comments, and also: > - const char *filename = NULL; > + const char *filename = NULL, *config_src=NULL; This has inconsistent use of whitespace. > + if (filename) > + { This should have { on the same line as the if. > + if (libxl_read_file_contents(ctx, filename, (void **)&config_data, > + &config_len)) { > + fprintf(stderr, "Failed to read config file: %s: %s\n", > + filename, strerror(errno)); > + return -ERROR_FAIL; > + } > + config_src=filename; We put spaces around "=". (Here and a few lines further on.) > + } > + else And on the same line as the else. And having { } for the if, I think putting { } for the else block would be more conventional. > - printf("Using config file \"%s\"\n", filename); > + printf("Using config file \"%s\"\n", config_src); This will print Using config file "command line" which is rather an odd message. Perhaps change the string to `' and remove the quotes ? Ian.