From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NvWB9-0001t8-GS for qemu-devel@nongnu.org; Sat, 27 Mar 2010 09:35:55 -0400 Received: from [140.186.70.92] (port=49654 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NvWB7-0001pA-Iy for qemu-devel@nongnu.org; Sat, 27 Mar 2010 09:35:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NvWAw-0000Qm-CM for qemu-devel@nongnu.org; Sat, 27 Mar 2010 09:35:43 -0400 Received: from isrv.corpit.ru ([81.13.33.159]:37563) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NvWAw-0000QI-5S for qemu-devel@nongnu.org; Sat, 27 Mar 2010 09:35:42 -0400 Message-ID: <4BAE09A9.8020505@msgid.tls.msk.ru> Date: Sat, 27 Mar 2010 16:35:37 +0300 From: Michael Tokarev MIME-Version: 1.0 Subject: Re: [Qemu-devel] [trivial one-liner] be more specific in -mem-path error messages References: <4B9F3AEA.8010408@msgid.tls.msk.ru> <20100327123350.GA19617@volta.aurel32.net> In-Reply-To: <20100327123350.GA19617@volta.aurel32.net> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: qemu-devel Aurelien Jarno wrote: > On Tue, Mar 16, 2010 at 11:01:46AM +0300, Michael Tokarev wrote: >> The error message qemu gives when hugetlbfs is not >> accessible is cryptic at best: >> >> mkstemp: Permission denied >> >> Make it a bit more specific instead: >> >> unable to create backing store for hugepages: Permission denied >> >> Thanks! > > It looks good, but needs a Signed-off-by: line. Are we now requiring such S-o-b lines even for such trivial stuff? Oh well..... Ok, here we go, with another perror() case converted to be a bit less cryptic. Thanks! Signed-Off-By: Michael Tokarev diff --git a/exec.c b/exec.c index fcffb0f..90032a5 100644 --- a/exec.c +++ b/exec.c @@ -2438,7 +2438,7 @@ static long gethugepagesize(const char *path) } while (ret != 0 && errno == EINTR); if (ret != 0) { - perror("statfs"); + perror(path); return 0; } @@ -2483,7 +2483,7 @@ static void *file_ram_alloc(ram_addr_t memory, const char *path) fd = mkstemp(filename); if (fd < 0) { - perror("mkstemp"); + perror("unable to create backing store for hugepages"); free(filename); return NULL; }