be more specific in -mem-path error messages
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
exec.c +1 -1
@@ -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 ;
Quoted 10 lines · Michael Tokarev
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.
Quoted 16 lines
/mjt
exec.c +1
-1@@ -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 ;
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net
Quoted 6 lines · Aurelien Jarno
Quoted 5 lines · Michael Tokarev
The error message qemu gives when hugetlbfs is not accessible is cryptic at best:
mkstemp: Permission denied
Quoted 7 lines
Quoted 5 lines
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!
exec.c +2 -2
@@ -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 ; }