Re: [Qemu-devel] [PATCH 14/16] os-posix: cleanup: Replace fprintf with error_report in remaining call sites

2018-04-24 Thread Thomas Huth
On 24.04.2018 19:58, Ian Jackson wrote:
> Signed-off-by: Ian Jackson 
> CC: Paolo Bonzini 
> CC: Markus Armbruster 
> CC: Daniel P. Berrange 
> CC: Michael Tokarev 
> Reviewed-by: Philippe Mathieu-Daudé 
> ---
> v8: Remove one remaining spurious "\n"
> v7: New patch
> ---
>  os-posix.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/os-posix.c b/os-posix.c
> index 0f59566..a2ba50d 100644
> --- a/os-posix.c
> +++ b/os-posix.c
> @@ -129,7 +129,7 @@ void os_set_proc_name(const char *s)
>  exit(1);
>  }
>  #else
> -fprintf(stderr, "Change of process name not supported by your OS\n");
> +error_report("Change of process name not supported by your OS");
>  exit(1);
>  #endif
>  }
> @@ -243,7 +243,7 @@ static void change_root(void)
>  {
>  if (chroot_dir) {
>  if (chroot(chroot_dir) < 0) {
> -fprintf(stderr, "chroot failed\n");
> +error_report("chroot failed");
>  exit(1);
>  }
>  if (chdir("/")) {
> 

Maybe merge this with patch 9/16?

Anyway:

Reviewed-by: Thomas Huth 




[Qemu-devel] [PATCH 14/16] os-posix: cleanup: Replace fprintf with error_report in remaining call sites

2018-04-24 Thread Ian Jackson
Signed-off-by: Ian Jackson 
CC: Paolo Bonzini 
CC: Markus Armbruster 
CC: Daniel P. Berrange 
CC: Michael Tokarev 
Reviewed-by: Philippe Mathieu-Daudé 
---
v8: Remove one remaining spurious "\n"
v7: New patch
---
 os-posix.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/os-posix.c b/os-posix.c
index 0f59566..a2ba50d 100644
--- a/os-posix.c
+++ b/os-posix.c
@@ -129,7 +129,7 @@ void os_set_proc_name(const char *s)
 exit(1);
 }
 #else
-fprintf(stderr, "Change of process name not supported by your OS\n");
+error_report("Change of process name not supported by your OS");
 exit(1);
 #endif
 }
@@ -243,7 +243,7 @@ static void change_root(void)
 {
 if (chroot_dir) {
 if (chroot(chroot_dir) < 0) {
-fprintf(stderr, "chroot failed\n");
+error_report("chroot failed");
 exit(1);
 }
 if (chdir("/")) {
-- 
2.1.4




Re: [Qemu-devel] [PATCH 14/16] os-posix: cleanup: Replace fprintf with error_report in remaining call sites

2018-04-20 Thread Ian Jackson
Philippe Mathieu-Daudé writes ("Re: [Qemu-devel] [PATCH 14/16] os-posix: 
cleanup: Replace fprintf with error_report in remaining call sites"):
> On 04/19/2018 01:45 PM, Ian Jackson wrote:
> > -fprintf(stderr, "Change of process name not supported by your OS\n");
> > +error_report("Change of process name not supported by your OS\n");
> 
> removing the trailing "\n":
> Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>

Damn, missed one!  Thanks :-).

Ian.



Re: [Qemu-devel] [PATCH 14/16] os-posix: cleanup: Replace fprintf with error_report in remaining call sites

2018-04-19 Thread Philippe Mathieu-Daudé
Hi Ian,

On 04/19/2018 01:45 PM, Ian Jackson wrote:
> Signed-off-by: Ian Jackson 
> CC: Paolo Bonzini 
> CC: Markus Armbruster 
> CC: Daniel P. Berrange 
> CC: Michael Tokarev 
> ---
> v7: New patch
> ---
>  os-posix.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/os-posix.c b/os-posix.c
> index 0f59566..d4cf466 100644
> --- a/os-posix.c
> +++ b/os-posix.c
> @@ -129,7 +129,7 @@ void os_set_proc_name(const char *s)
>  exit(1);
>  }
>  #else
> -fprintf(stderr, "Change of process name not supported by your OS\n");
> +error_report("Change of process name not supported by your OS\n");

removing the trailing "\n":
Reviewed-by: Philippe Mathieu-Daudé 

>  exit(1);
>  #endif
>  }
> @@ -243,7 +243,7 @@ static void change_root(void)
>  {
>  if (chroot_dir) {
>  if (chroot(chroot_dir) < 0) {
> -fprintf(stderr, "chroot failed\n");
> +error_report("chroot failed");
>  exit(1);
>  }
>  if (chdir("/")) {
> 



[Qemu-devel] [PATCH 14/16] os-posix: cleanup: Replace fprintf with error_report in remaining call sites

2018-04-19 Thread Ian Jackson
Signed-off-by: Ian Jackson 
CC: Paolo Bonzini 
CC: Markus Armbruster 
CC: Daniel P. Berrange 
CC: Michael Tokarev 
---
v7: New patch
---
 os-posix.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/os-posix.c b/os-posix.c
index 0f59566..d4cf466 100644
--- a/os-posix.c
+++ b/os-posix.c
@@ -129,7 +129,7 @@ void os_set_proc_name(const char *s)
 exit(1);
 }
 #else
-fprintf(stderr, "Change of process name not supported by your OS\n");
+error_report("Change of process name not supported by your OS\n");
 exit(1);
 #endif
 }
@@ -243,7 +243,7 @@ static void change_root(void)
 {
 if (chroot_dir) {
 if (chroot(chroot_dir) < 0) {
-fprintf(stderr, "chroot failed\n");
+error_report("chroot failed");
 exit(1);
 }
 if (chdir("/")) {
-- 
2.1.4