From patchwork Tue Jan 29 17:36:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael David Tinoco X-Patchwork-Id: 157006 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp4935899jaa; Tue, 29 Jan 2019 09:37:56 -0800 (PST) X-Google-Smtp-Source: ALg8bN6Q4aFv540jNvNKCP9bbTmcvVAt/9EepfhZ+8MmgiXCMyGS9LUqSaeCFtZhTtVs01nRdY78 X-Received: by 2002:a50:a3d1:: with SMTP id t17mr26915156edb.238.1548783476445; Tue, 29 Jan 2019 09:37:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548783476; cv=none; d=google.com; s=arc-20160816; b=BySH522+LzwzB9X5CQ+4Ip4inIdyrF6NgZNJgtCxx5j1GaaUpI4l76T1UabQWFAg96 yRFMxgM/nJSHs8omQpFn8Cm733CfvWVWZ9DGlF0CEPG5zqxJOupnn0JG8+tdw0ERbHXf sSKYFKAUNzO4fZU2RBw7M8IIhWq/m1uI5KoeU+DwcRYiYmcF349CdwhXfZ8f7/gdIwA+ om0ZOU7bgZfw6aASFWYbcH2K81KBy/ChOGK/I5ShMm4RzCItVcmetLJWpRNh3GNmLWY6 /AD150HMFZG3PCYsHCpaJFoLdILHakcVDcPuaKoYXxBzrU0Sbj39pco7dKWJX4TLWe2E tASw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=i0pbFV0KdtoBlGqCj0FaR83qwZroqDpBhA8Gds+cAZs=; b=w3hGn1b7f6mMK9PfOb1vay15byRjSLUKJuVb45ZvaBnPnxp54IYYLoSxnm8fzPMBjF JKum0itLr7IzVEWsX7KGk5BDaHIjLifW6MjlrlAbH0i2pufHJKm+UtE+uPC8/8Jo0HB2 ZiD4CbsGQbuPY643hsqzSKbciMb4+oTidlJxneDYUwmQdx7oeu2D7218z5F3UoN34Shk nKe/tidadgLT8tlQmheSUlyPhJH6ID6xvWpLpgqGTHZZVicGzykBcCVzSySvNxlOOQ0g DO4KSEYMjiTw5IYwdLKJzaeIySfWHSx0+Fq7UivFygVLPAf9Anqk4h1x/q49jfznesYi xbvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=JArB+1OA; spf=pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 213.254.12.146 as permitted sender) smtp.mailfrom="ltp-bounces+patch=linaro.org@lists.linux.it"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from picard.linux.it (picard.linux.it. [213.254.12.146]) by mx.google.com with ESMTPS id i3si3008687edk.411.2019.01.29.09.37.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Jan 2019 09:37:56 -0800 (PST) Received-SPF: pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 213.254.12.146 as permitted sender) client-ip=213.254.12.146; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=JArB+1OA; spf=pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 213.254.12.146 as permitted sender) smtp.mailfrom="ltp-bounces+patch=linaro.org@lists.linux.it"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 0536E3EAD11 for ; Tue, 29 Jan 2019 18:37:56 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [217.194.8.2]) by picard.linux.it (Postfix) with ESMTP id AC39D3EAD5A for ; Tue, 29 Jan 2019 18:37:14 +0100 (CET) Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id 243C160165F for ; Tue, 29 Jan 2019 18:37:14 +0100 (CET) Received: by mail-qt1-x841.google.com with SMTP id n32so23107661qte.11 for ; Tue, 29 Jan 2019 09:37:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tBBiV1epWnJS+Ahn74Gjy8G0j2CXqGLXkM6kNwe3hvc=; b=JArB+1OAqZPfu7a/qTiGRGbpMVTJQU19DYKG/iPl+wlYGEiQ9GN+IqXmJHOPyO9IJ5 NXkTjqyOOTPqffgXie6RT/m9RLmy3kgtFAJ2n6y8MNZZ8ivo5FtvZsWqSFC60jDmXcoM D8N3orRJUxhADfiqcjRtSQr5/qny3VoGY37j8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tBBiV1epWnJS+Ahn74Gjy8G0j2CXqGLXkM6kNwe3hvc=; b=hP05Hz4oO2eEM0+8nWZNF27N5/b8ft3Yz5jVtGLdUd9gjInCOgxfRkkTWpYWB7ZeNT xJ95XQuGhGYsl7hDHnsalyH9cHS2BxHDFviYtYoUZsrOLPidNTr6Nm36YlTuCdE+vMC4 tdX4DkJAeqpnjXqDij0rQEu+JFaUApUHzx+rav9VpLP8JmtkA9407S3lV0kOOzFTOrHC hhEvqZekm2I9GkU9ooLMMe8nNMKPU+RrsSI8A6qVoBwr2B7odIlkQVTLhbaZyZBr4DvN ZTixdFR4HsA1n2CzS7/kZX5gdA2GhIDQnCBgkEmPCMxGDYqqSz+akZ+iX4gWDTMpbYic /lnA== X-Gm-Message-State: AJcUukevZGUHLoP5V0xG/vdKv/4bBnJppE261vlSMKQp/Szgd0JM5Y0H 25Nd8zs+uzAKpj9pUB5rsfqrMamfnRI= X-Received: by 2002:a0c:d792:: with SMTP id z18mr25599758qvi.183.1548783432741; Tue, 29 Jan 2019 09:37:12 -0800 (PST) Received: from workstation.celeiro.br. ([168.194.163.64]) by smtp.gmail.com with ESMTPSA id a20sm56890855qkj.28.2019.01.29.09.37.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Jan 2019 09:37:12 -0800 (PST) From: Rafael David Tinoco To: ltp@lists.linux.it Date: Tue, 29 Jan 2019 15:36:57 -0200 Message-Id: <20190129173659.27901-6-rafael.tinoco@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190129173659.27901-1-rafael.tinoco@linaro.org> References: <20190124161159.GC16804@rei.lan> <20190129173659.27901-1-rafael.tinoco@linaro.org> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH v4 6/8] tst_timer: Turn clock_name() function public X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+patch=linaro.org@lists.linux.it Sender: "ltp" This commit exposes clock_name() function by removing its static definition and creating a public function prototype. This function is needed by clock/alarm tests and their error messages. Signed-off-by: Rafael David Tinoco --- include/tst_timer.h | 5 +++++ lib/tst_timer.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/tst_timer.h b/include/tst_timer.h index 043b71460..c66f630c4 100644 --- a/include/tst_timer.h +++ b/include/tst_timer.h @@ -332,4 +332,9 @@ static inline long long tst_timer_elapsed_us(void) return tst_timespec_to_us(tst_timer_elapsed()); } +/* + * Returns a string containing given clock type name + */ +const char *clock_name(clockid_t); + #endif /* TST_TIMER */ diff --git a/lib/tst_timer.c b/lib/tst_timer.c index dffaba0cb..e83da7ff6 100644 --- a/lib/tst_timer.c +++ b/lib/tst_timer.c @@ -15,7 +15,7 @@ static struct timespec start_time, stop_time; static clockid_t clock_id; -static const char *clock_name(clockid_t clk_id) +const char *clock_name(clockid_t clk_id) { switch (clk_id) { case CLOCK_REALTIME: