Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935528AbdLRTTu (ORCPT ); Mon, 18 Dec 2017 14:19:50 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:42778 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934113AbdLRTTp (ORCPT ); Mon, 18 Dec 2017 14:19:45 -0500 X-Google-Smtp-Source: ACJfBou4Q+5Aldx5sVuLp2YUxz3CCAyBcGMX7fpQBRjc/XDXeY/sfsN12qPSZH6fda7pbzaDr5KqqA== Cc: mtk.manpages@gmail.com, Linux Kernel Mailing List , Linux API , John Stultz , Thomas Gleixner , Stephen Boyd Subject: Re: [PATCH] [man-pages] adjtimex.2: document clock_adjtime To: Richard Cochran , Arnd Bergmann References: <20171120225302.3379657-1-arnd@arndb.de> <20171121030459.swng4eyke34uf3sv@localhost> <20171121160601.2xti5ho5pul2v7tm@localhost> From: "Michael Kerrisk (man-pages)" Message-ID: <436eb61b-0fe2-41c8-0992-e21614fd3657@gmail.com> Date: Mon, 18 Dec 2017 20:19:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20171121160601.2xti5ho5pul2v7tm@localhost> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1110 Lines: 35 Hi Richard, On 11/21/2017 05:06 PM, Richard Cochran wrote: > On Tue, Nov 21, 2017 at 09:06:37AM +0100, Arnd Bergmann wrote: >> >> I copied that line from clock_gettime() man page. I suppose we want to >> fix change this in both pages, right? Any suggestions for a good way to >> express your explanation in the man page? I suppose we don't want to >> go into details of the implementation there but still capture the possible >> corner cases. > > Dynamic clockids are a Linux specific extension. This should be > explained with a paragraph or two on the gettime man page, along with > an example using the macros. > > #define CLOCKFD 3 > #define FD_TO_CLOCKID(fd) ((~(clockid_t) (fd) << 3) | CLOCKFD) > #define CLOCKID_TO_FD(clk) ((unsigned int) ~((clk) >> 3)) > > Then, the adjtimex page can say, see gettime. > > Let me try to come up with a text over the (USA) holiday weekend. Might you have a chance to look at this still? Cheers, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/