Patchwork [trivial,one-liner] be more specific in -mem-path error messages

login
register
mail settings
Submitter Michael Tokarev
Date March 27, 2010, 1:35 p.m.
Message ID <4BAE09A9.8020505@msgid.tls.msk.ru>
Download mbox | patch
Permalink /patch/48747/
State New
Headers show

Comments

Michael Tokarev - March 27, 2010, 1:35 p.m.
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 <mjt@tls.msk.ru>

Patch

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;
     }