[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 09/11] libports: improve error reporting in adjust_priority
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 09/11] libports: improve error reporting in adjust_priority |
Date: |
Wed, 27 Nov 2013 22:48:22 +0100 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Wed 27 Nov 2013 13:31:16 +0100, a écrit :
> By using error instead of perror, the warning can be proprely
> attributed to the process.
>
> * libports/manage-multithread.c (adjust_priority): Use error instead
> of perror to print the warning.
Ack.
> ---
> libports/manage-multithread.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/libports/manage-multithread.c b/libports/manage-multithread.c
> index d034582..be08030 100644
> --- a/libports/manage-multithread.c
> +++ b/libports/manage-multithread.c
> @@ -20,6 +20,7 @@
>
> #include "ports.h"
> #include <assert.h>
> +#include <error.h>
> #include <stdio.h>
> #include <mach/message.h>
> #include <mach/thread_info.h>
> @@ -82,10 +83,7 @@ out:
> mach_port_deallocate (mach_task_self (), pset_priv);
>
> if (err && err != EPERM)
> - {
> - errno = err;
> - perror ("unable to adjust libports thread priority");
> - }
> + error (0, err, "unable to adjust libports thread priority");
> }
>
> void
> --
> 1.7.10.4
>
--
Samuel
#ifndef I_WISH_WORLD_WERE_PERFECT
/* It is not :-( All the routers (except for Linux) return only
...
-+- linux/net/ipv4/ipip.c -+-
- Re: [PATCH 02/11] init: fix port leak, (continued)
- [PATCH 05/11] libports: improve error handling in ports_reallocate_from_external, Justus Winter, 2013/11/27
- [PATCH 06/11] libports: improve error handling in ports_transfer_right, Justus Winter, 2013/11/27
- [PATCH 07/11] libdiskfs: improve error reporting in diskfs_start_disk_pager, Justus Winter, 2013/11/27
- [PATCH 10/11] proc: store the privileged host port in _hurd_host_priv, Justus Winter, 2013/11/27
- [PATCH 09/11] libports: improve error reporting in adjust_priority, Justus Winter, 2013/11/27
- Re: [PATCH 09/11] libports: improve error reporting in adjust_priority,
Samuel Thibault <=
- [PATCH 08/11] libfshelp: improve error handling in fshelp_start_translator_long, Justus Winter, 2013/11/27
- [PATCH 11/11] proc: store the device master port in _hurd_device_master, Justus Winter, 2013/11/27
- Re: [PATCH 01/11] libshouldbeinlibc: fix minor port leak in maptime_map, Samuel Thibault, 2013/11/27