From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH 09/11] tools/xc: pass errno to callers of xc_domain_save Date: Tue, 11 Mar 2014 09:21:01 +0100 Message-ID: <20140311082101.GA8230@aepfle.de> References: <1394122436-1392-1-git-send-email-olaf@aepfle.de> <1394122436-1392-10-git-send-email-olaf@aepfle.de> <21272.48052.437173.290651@mariner.uk.xensource.com> <20140306191922.GC4113@aepfle.de> <21277.60698.629905.132053@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <21277.60698.629905.132053@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: Ian.Campbell@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Mon, Mar 10, Ian Jackson wrote: > Yes, except the temporary should be called "error_macro_errno" or > something. I have changed it, now it looks like this: +#define PERROR(_m, _a...) do { int PERROR_errno = errno; \ + xc_report_error(xch,XC_INTERNAL_ERROR,_m " (%d = %s)", \ + ## _a , errno, xc_strerror(xch, errno)); \ + errno = PERROR_errno; \ + } while (0) Olaf