From patchwork Mon Nov 20 22:53:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 119333 Delivered-To: patch@linaro.org Received: by 10.80.225.132 with SMTP id k4csp4362890edl; Mon, 20 Nov 2017 14:53:25 -0800 (PST) X-Google-Smtp-Source: AGs4zMbdEnU0z1ylBpk9ZYpMEL9oRhYoS3fu2Hd4Buyq6GaTjhVhSha3fpxmC+S/2OrV3inTI+Eg X-Received: by 10.98.14.89 with SMTP id w86mr13081409pfi.195.1511218405229; Mon, 20 Nov 2017 14:53:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511218405; cv=none; d=google.com; s=arc-20160816; b=0kbXYqhY3r/hHkQlxsQz+ypWNV9Pat1zaRNe5K2xL54JvTJ0qThqLk9y1QIWJAr0PZ HisrDP/66XJC11v35mA6oFRvOFlBQu2pvXLLfoRLF9OIAYLjKTXZ7tRJLQzJj4kT3Hdy VYZa03JlXyCcyO4w4I3bakA7AAh9K5U1cUv5lvLPkPGs9duN5rpW7G5iQ+qx/TbuSMV4 hNGZ0Zp3qrVle7ZxIZqELgMLVUqeYJwlq0eSGCx4k5CwEY5zl7Jwx2FVnAxCvMwJ0NxV 9G5Vygrx/TNI7dp5oSmSqHsApY/GySABxIpLSHw/d1oAycRphp6NNjz2xDKrpd1jLpu8 YcNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=9CY8fBh9apFrMiiDqO/1z1gt3SV8qIwpwvi/wey1Ko4=; b=wvS3G/MjyspV2MBZZGiI5xVm9SwM2vZhNvYzzJAHJwMVTdwsWP6ysS9ueuv/T8uCnY 2cEsYVJ8Bh9S7t+kMfze7nwO9BmGqLp/MHwjIKmt2s+mV+l3rVocwzRX0jfKPdL7lIuw Sy+ErLGWCli2kvByslf+bFoyy2uRHt8yucEyRNnJTRsGwu9uI0lpl2LBL+zmhkthWAEy m5XWXlOV4tXPBhCtd/hQQpGjOFCRy5BFWs9W/LwJUJ1BfVadF05LohmH2JjAf0Dsoj7J LsCNceGKjof380VHj6BtrAyfu/IKBBSB6yKMFJXEBF8pfggWDvEN+mbj1Tbu8aHPNI0y 3Wlg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q10si9143153pge.349.2017.11.20.14.53.24; Mon, 20 Nov 2017 14:53:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751494AbdKTWxV (ORCPT + 12 others); Mon, 20 Nov 2017 17:53:21 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:64046 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751158AbdKTWxT (ORCPT ); Mon, 20 Nov 2017 17:53:19 -0500 Received: from wuerfel.lan ([109.193.157.232]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0MPp3a-1eBx7R0JNq-004zST; Mon, 20 Nov 2017 23:53:07 +0100 From: Arnd Bergmann To: Michael Kerrisk Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, John Stultz , Thomas Gleixner , Stephen Boyd , Richard Cochran , Arnd Bergmann Subject: [PATCH] [man-pages] adjtimex.2: document clock_adjtime Date: Mon, 20 Nov 2017 23:53:02 +0100 Message-Id: <20171120225302.3379657-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:85RXeWETSU6aR8cx1Iu2RPw86YCJ52Zh1WlaUrQoEOhLhyNM5L4 +RDQpkG9N1dwix047rikmU23VdokRqZkKNmONYsdcEyc7CAdLRrQDMO1pHM2nAVRI5p55DO Ui8pV9zS1VrlGmFTFfJPCGcLzRVGcVN9uMcI5WoI+n9oJlRC08p9OQGsnvC+5j+Ji0KMtrv /X82bfLEEnWFqjUOJUZ/w== X-UI-Out-Filterresults: notjunk:1; V01:K0:k0ekvjofsC0=:+qZmzrJsvc8ncn7tsgU5l1 B7SxaZWVZ4gLRgxeQf8NYiX27pOwM/ZjU8PMxsebY41oFPiA54aq7outUsinTHNeBqIHSBuZj si/J/L+QfBRH67P/n1ENx4alKA2S2WP89SpVlylJuD7M/gMrhmkxuOoQ/21sodhKCkFHy7U5G NB00EkWG8cZxTEtpv1PuuYZa9tuVElmxaXgO5y6yMW3U1jKXe3FajdYmUYR6Blo7j/sTadJTU iKy9uA7nPEpcAK6MLUPese54anhqtboLpNPuH+qBTcVRFyKEhGaKpz6H810T2dhy0xvLAyHoA WCMxaXlnx73q+eI1Ht9E+tpp798Prh/3kBdRZqB3iJQGQYDwJvsiigakyvJIlrCbbP78ig3JA z5f4lnLNsbIXBzM4CNzTOiRxsVY5UMkUgXVefaj+6bxZIVCOVykpUIp10IBInJCH5N03LnEBo aJKUnC8zFSVxraq6asWj1vrN8EfZKVQQzXz3GaK5HDSm3s/W10Il5wvsW7u/b+VOQ9ScVWKgS hiCu7mvck8RjFyWUVpJnmbn03E7ZrEqyI6c3JhcLeaXcqXy0LvATlEp3CgN64KpllcJtinN2S 5KZOETHftpxffThtrDZoT60rPiEn9nu2v5pHBZUO1zTHusUX6nP53TKAjJJdbRJEWzpcePX3c Qx5iWoE8io0bYw+GpDSreVaHKtHkdAsAjN3ULOzLUMx5EliRlwg8VWv01yr5R+CR5ZmthNyil hk2MhRv7qSNjPVWauo2cX1+G9xZq5csIH3RQKw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I was experimenting with some possible changes to adjtimex(2) and clock_adjtime(2) and tried to look up the man page to see what the documented behavior is when I noticed that clock_adjtime() appears to be the only system call that is currently undocumented. Before I do any changes to it, this tries to document what I understand it currently does. Signed-off-by: Arnd Bergmann --- This is my first patch to man-pages, I'm just guessing about what should be in there and how to format it, please reword or reformat as necessary. --- man2/adjtimex.2 | 25 +++++++++++++++++++++++-- man2/clock_adjtime.2 | 1 + 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 man2/clock_adjtime.2 -- 2.9.0 diff --git a/man2/adjtimex.2 b/man2/adjtimex.2 index fc6892d..b7c0a5f 100644 --- a/man2/adjtimex.2 +++ b/man2/adjtimex.2 @@ -35,6 +35,8 @@ adjtimex, ntp_adjtime \- tune kernel clock .PP .BI "int adjtimex(struct timex *" "buf" ); .PP +.BI "int clock_adjtimex(clockid_t " clk_id, " struct timex *" "buf" ); +.PP .BI "int ntp_adjtime(struct timex *" buf ); .fi .SH DESCRIPTION @@ -344,6 +346,12 @@ Attempts to set read-only .I status bits are silently ignored. .\" +.SS clock_adjtime () +The +.BR clock_adjtime () +system call (added in Linux 2.6.39) behaves like adjtimex() but takes an additional +.IR clk_id +argument to specify the particular clock on which to act. .SS ntp_adjtime () The .BR ntp_adjtime () @@ -472,6 +480,11 @@ An attempt was made to set to a value other than those listed above. .TP .B EINVAL +The +.I clk_id +specified is not supported on this system. +.TP +.B EINVAL An attempt was made to set .I buf.tick to a value outside the range @@ -482,6 +495,10 @@ where .B HZ is the system timer interrupt frequency. .TP +.B EOPNOTSUPP +.I clk_id +does not support adjustment +.TP .B EPERM .I buf.modes is neither 0 nor @@ -503,10 +520,12 @@ T{ T} Thread safety MT-Safe .TE .SH CONFORMING TO -Neither of these interfaces is described in POSIX.1 +None of these interfaces is described in POSIX.1 .PP .BR adjtimex () -is Linux-specific and should not be used in programs +and +.BR clock_adjtimex () +are Linux-specific and should not be used in programs intended to be portable. .PP The preferred API for the NTP daemon is @@ -533,6 +552,8 @@ is done by the kernel in timer context Thus, it will take one tick into the second for the leap second to be inserted or deleted. .SH SEE ALSO +.BR clock_gettime (2) +.BR clock_settime (2) .BR settimeofday (2), .BR adjtime (3), .BR ntp_gettime (3), diff --git a/man2/clock_adjtime.2 b/man2/clock_adjtime.2 new file mode 100644 index 0000000..b08b9c8 --- /dev/null +++ b/man2/clock_adjtime.2 @@ -0,0 +1 @@ +.so man2/adjtimex.2