From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [PATCH] drm: Fix error message in drmWaitVBlank Date: Thu, 28 Mar 2013 08:34:45 -0700 Message-ID: <20130328083445.79b801fd@jbarnes-desktop> References: <1364450740-10118-1-git-send-email-djkurtz@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from oproxy5-pub.bluehost.com (oproxy5-pub.bluehost.com [67.222.38.55]) by gabe.freedesktop.org (Postfix) with SMTP id 1FB4FE630A for ; Thu, 28 Mar 2013 08:34:27 -0700 (PDT) In-Reply-To: <1364450740-10118-1-git-send-email-djkurtz@chromium.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Daniel Kurtz Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Thu, 28 Mar 2013 14:05:40 +0800 Daniel Kurtz wrote: > If clock_gettime did fail, it would return -1 and set errno. > What we really want to strerror() is the errno. > > Signed-off-by: Daniel Kurtz > --- > xf86drm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/xf86drm.c b/xf86drm.c > index 2a74c80..4791a05 100644 > --- a/xf86drm.c > +++ b/xf86drm.c > @@ -1946,7 +1946,7 @@ int drmWaitVBlank(int fd, drmVBlankPtr vbl) > > ret = clock_gettime(CLOCK_MONOTONIC, &timeout); > if (ret < 0) { > - fprintf(stderr, "clock_gettime failed: %s\n", strerror(ret)); > + fprintf(stderr, "clock_gettime failed: %s\n", strerror(errno)); > goto out; > } > timeout.tv_sec++; Applied, thanks. -- Jesse Barnes, Intel Open Source Technology Center