qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [trivial one-liner] be more specific in -mem-path error messages
@ 2010-03-16  8:01 Michael Tokarev
  2010-03-27 12:33 ` Aurelien Jarno
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Tokarev @ 2010-03-16  8:01 UTC (permalink / raw)
  To: qemu-devel

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!

/mjt

diff --git a/exec.c b/exec.c
index 891e0ee..985bdde 100644
--- a/exec.c
+++ b/exec.c
@@ -2569,5 +2569,5 @@ 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;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [trivial one-liner] be more specific in -mem-path error messages
  2010-03-16  8:01 [Qemu-devel] [trivial one-liner] be more specific in -mem-path error messages Michael Tokarev
@ 2010-03-27 12:33 ` Aurelien Jarno
  2010-03-27 13:35   ` Michael Tokarev
  0 siblings, 1 reply; 3+ messages in thread
From: Aurelien Jarno @ 2010-03-27 12:33 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: qemu-devel

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.

> /mjt
> 
> diff --git a/exec.c b/exec.c
> index 891e0ee..985bdde 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -2569,5 +2569,5 @@ 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;
> 
> 
> 

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [trivial one-liner] be more specific in -mem-path error messages
  2010-03-27 12:33 ` Aurelien Jarno
@ 2010-03-27 13:35   ` Michael Tokarev
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Tokarev @ 2010-03-27 13:35 UTC (permalink / raw)
  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 <mjt@tls.msk.ru>

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-27 13:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-16  8:01 [Qemu-devel] [trivial one-liner] be more specific in -mem-path error messages Michael Tokarev
2010-03-27 12:33 ` Aurelien Jarno
2010-03-27 13:35   ` Michael Tokarev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).