Linux Manual Pages development
 help / color / mirror / Atom feed
From: Georg Sauthoff <mail@gms.tf>
To: Alejandro Colomar <alx@kernel.org>
Cc: linux-man@vger.kernel.org, Georg Sauthoff <mail@gms.tf>
Subject: [PATCH v2 0/2] man/man2/adjtimex.2: Fix include+add error
Date: Tue, 27 Oct 2026 01:37:10 +0100	[thread overview]
Message-ID: <20261027003712.905789-1-mail@gms.tf> (raw)
In-Reply-To: <20261025125656.877530-1-mail@gms.tf>

Hello,

this series fixes the include instructions for clock_adjtime() 
and documents another error its invocation may yield.

Changes v1 -> v2:
- split patch into series
- use define-style feature macro instead of extra section
- fix font style macro usage

Best regards,
Georg

Georg Sauthoff (2):
  man/man2/adjtimex.2: Add include and macro for clock_adjtime
  man/man2/adjtimex.2: Add error for clock_adjtime

 man/man2/adjtimex.2 | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

Range-diff against v1:
1:  ddd4886f0 ! 1:  1f6278005 man/man2/adjtimex.2: Add include, macro and error for clock_adjtime
    @@ Metadata
     Author: Georg Sauthoff <mail@gms.tf>
     
      ## Commit message ##
    -    man/man2/adjtimex.2: Add include, macro and error for clock_adjtime
    +    man/man2/adjtimex.2: Add include and macro for clock_adjtime
     
         GNU libc declares clock_adjtime() when including time.h, and not when
         just sys/timex.h is included, iff support for GNU features is requested.
    @@ Commit message
     
         (Test output is from a Fedora 43 system)
     
    -    The ERANGE error can be verified either via trying to adjust the
    -    frequency of a PHC by a value that is outside of [-X,X],
    -    where X=`cat /sys/class/ptp/ptpX/max_adjustment`,
    -    or via checking the kernel source code:
    -
    -    <https://elixir.bootlin.com/linux/v7.2.2/source/drivers/ptp/ptp_clock.c#L164>
    -
      ## man/man2/adjtimex.2 ##
     @@ man/man2/adjtimex.2: .SH SYNOPSIS
      .P
    @@ man/man2/adjtimex.2: .SH SYNOPSIS
     -.P
      .BI "int ntp_adjtime(struct timex *" buf );
     +.P
    -+.BR #include <time.h>
    ++.BR #define\~_GNU_SOURCE "  // See feature_test_macros(7)"
    ++.B #include <time.h>
     +.P
     +.BI "int clock_adjtime(clockid_t " clk_id, " struct timex *" "buf" );
    -+.fi
    -+.P
    -+.RS -4
    -+Feature Test Macro Requirements for glibc (see
    -+.BR feature_test_macros (7)):
    -+.RE
    -+.P
    -+.BR clock_adjtime ():
    -+.nf
    -+    _GNU_SOURCE
      .fi
      .SH DESCRIPTION
      Linux uses David L.\& Mills' clock adjustment algorithm (see RFC\ 5905).
    -@@ man/man2/adjtimex.2: .SH ERRORS
    - Under Linux, the
    - .B CAP_SYS_TIME
    - capability is required.
    -+.TP
    -+.B ERANGE
    -+The frequency offset supplied with
    -+.BR clock_adjtime ()
    -+is outside of the range clock clk_id supports.
    -+See also /sys/class/ptp/ptpX/max_adjustment when adjusting a PTP hardware clock.
    - .SH ATTRIBUTES
    - For an explanation of the terms used in this section, see
    - .BR attributes (7).
-:  --------- > 2:  578a02146 man/man2/adjtimex.2: Add error for clock_adjtime
-- 
2.55.0


  parent reply	other threads:[~2026-10-27  0:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-25 12:56 [PATCH v1] man/man2/adjtimex.2: Add include, macro and error for clock_adjtime Georg Sauthoff
2026-10-25 18:49 ` Alejandro Colomar
2026-10-25 21:37   ` Georg Sauthoff
2026-10-27  0:37 ` Georg Sauthoff [this message]
2026-10-27  0:37   ` [PATCH v2 1/2] man/man2/adjtimex.2: Add include and macro " Georg Sauthoff
2026-10-27  0:37   ` [PATCH v2 2/2] man/man2/adjtimex.2: Add error " Georg Sauthoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261027003712.905789-1-mail@gms.tf \
    --to=mail@gms.tf \
    --cc=alx@kernel.org \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox