From patchwork Thu Mar 28 06:05:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Kurtz X-Patchwork-Id: 2354911 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 1F3093FDDA for ; Thu, 28 Mar 2013 07:09:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D110CE65CA for ; Thu, 28 Mar 2013 00:09:55 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pd0-f179.google.com (mail-pd0-f179.google.com [209.85.192.179]) by gabe.freedesktop.org (Postfix) with ESMTP id 22DE0E5C1A for ; Wed, 27 Mar 2013 23:05:49 -0700 (PDT) Received: by mail-pd0-f179.google.com with SMTP id x11so1010693pdj.10 for ; Wed, 27 Mar 2013 23:05:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=bqifnEWp577Hb+W1eNWnL7XYKQ7m8SmQwTT8hlaMS4Y=; b=dlTzwCX057f+6xX9d38xZdAZYuWzB6fpK0x0eD9gOlYiEk3GTSx+u9uyrigndCXn9f 2dGjHkLPMlrqYkK1wVU1fkngoSXvUFeWcR/A69Be6TfQ5dN5cxdxNmscmwtwYKZWX43p yIbjKTi0GJWY2R1hcXpPGbxW+YDfYlL2jSUOk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=bqifnEWp577Hb+W1eNWnL7XYKQ7m8SmQwTT8hlaMS4Y=; b=I2o4Mqe7K6md2SqTPAec2po6mnuCtWBC0rf8p4SkvVA3+M3Up0T90LaFSxTzAuzlQf nJiEKzhpTxRM0ASelZcr9diUusI4z1M9mzXcFmTv0bkFgcTmOUMaFEL9vmvxoqkRKhU6 DycyvPHuKt9qreO6eKfPtHeoysFbrkoJ6EbXpWUDD7Tsh8rbnBSRSniym9U3Y9eH68a+ ufUBbzYHzSsTn2i7kOHWjkmBuEhD0yMvgMUDonmd3AvJ6WFLmDp482sK+vkRzH40BCJ5 QXsCdFfFcKpU/QHgaF/Ee4X6OMIVe1XENhPnN7/i7SEJeQk1EHDei7YYX7S+KwqOS0BY YkQQ== X-Received: by 10.66.116.12 with SMTP id js12mr34217872pab.149.1364450748641; Wed, 27 Mar 2013 23:05:48 -0700 (PDT) Received: from djkurtz-z620.tpe.corp.google.com (djkurtz-z620.tpe.corp.google.com [172.30.210.61]) by mx.google.com with ESMTPS id fc8sm26322608pad.21.2013.03.27.23.05.46 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 27 Mar 2013 23:05:47 -0700 (PDT) From: Daniel Kurtz To: Jesse Barnes , dri-devel@lists.freedesktop.org Subject: [PATCH] drm: Fix error message in drmWaitVBlank Date: Thu, 28 Mar 2013 14:05:40 +0800 Message-Id: <1364450740-10118-1-git-send-email-djkurtz@chromium.org> X-Mailer: git-send-email 1.8.1.3 X-Gm-Message-State: ALoCoQn/lELwvcx/x5ru+iyMJzfp++oXGcahvMldcEzWETO2QxC1M1LH2tyP5uop7WvB7WiJZYsp X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org 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++;