From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.3 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id C98081F8C6 for ; Fri, 30 Jul 2021 12:03:17 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 75191385043C for ; Fri, 30 Jul 2021 12:03:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 75191385043C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1627646595; bh=LTGp+tKW50sns2T4Y9VOb0JcXaDePS+aIRnSsRxdGw8=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=PCYeEXVfTWeD9CyO12e0ABrjT8fJ4lFyVM6TS11TrqPLVPLtnwXxaSxzI1N4/pd6p uE+0YKhNN07gINdWKG7Ikc6SDX5Fk2oMKDtouOdcvR+AwvfMYcxQEn14YqBLT6hqG5 I1GSkyLt4au2C8GhCZaxE9QshXKJm8RbHIpG2Mjc= Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by sourceware.org (Postfix) with ESMTPS id 1388E393CC33 for ; Fri, 30 Jul 2021 12:02:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1388E393CC33 Received: by mail-wm1-x32b.google.com with SMTP id h24-20020a1ccc180000b029022e0571d1a0so6242819wmb.5 for ; Fri, 30 Jul 2021 05:02:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LTGp+tKW50sns2T4Y9VOb0JcXaDePS+aIRnSsRxdGw8=; b=L5a28MP5z2mJG/aadhR4VxyWjRPEYsRjyaJu2OEQU21M+HVdRwO+9/uHpDcB5RHLII kqbtyu3LqOp3AqaV93YtfHYeKsNZDmP596JS1xkBd+HiOdsDC9SXWpEzyZ0ggk3mNmGQ g/KdPomhBslMETESLLx5lQm3jlPVH8p8pT+TuLD+giFLnhJMsMErEQbBJrJCVhaQ4LJc U4z+8Rlcv+DPpbrdniRSHUV3FGAdBkdr2h8EFCucadIjDlYqEOtt4Zt8oi8N6b/xvAKl Iy+WRLzuCVtNIxP7YjORjnUHSR7s6RQboPvkyCYBvc4mUBqTrXUSyYjgPgNK4B6oGW4g 4ZPA== X-Gm-Message-State: AOAM531E0SeIUUVvUQ4Wt+srjH6ubF8ygj8rKZlos2crkTgbDuNMhL5g BUrRXPYpu+An6/MgyLMN7MM= X-Google-Smtp-Source: ABdhPJwMo/BF3fEAP29Mgf12fUO5qLHFgGOuF2qLuOVzMJdgFu1Ul7AOorXFqGOGBpfXpj4fdQ4aDw== X-Received: by 2002:a1c:32c1:: with SMTP id y184mr2574645wmy.70.1627646522215; Fri, 30 Jul 2021 05:02:02 -0700 (PDT) Received: from [10.8.0.10] ([195.53.121.100]) by smtp.gmail.com with ESMTPSA id x12sm1577825wrt.35.2021.07.30.05.02.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Jul 2021 05:02:01 -0700 (PDT) Subject: Re: [PATCH] ioctl_tty.2: Fix information about header include file To: =?UTF-8?Q?Pali_Roh=c3=a1r?= References: <20210730105353.10424-1-pali@kernel.org> Message-ID: Date: Fri, 30 Jul 2021 14:02:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210730105353.10424-1-pali@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: "Alejandro Colomar \(man-pages\) via Libc-alpha" Reply-To: "Alejandro Colomar \(man-pages\)" Cc: =?UTF-8?Q?Marek_Beh=c3=ban?= , "G. Branden Robinson" , libc-alpha@sourceware.org, Michael Kerrisk , linux-man@vger.kernel.org Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" Hi Pali, On 7/30/21 12:53 PM, Pali Rohár wrote: > Header file termios.h contains incompatible definitions for linux ioctl > calls. Correct definitions are exported by header file linux/termios.h but > this file conflicts with sys/ioctl.h header file (required for ioctl() > call). Therefore include direct asm header file asm/termbits.h which > contains compatible definitions and structures for ioctl calls. > > Signed-off-by: Pali Rohár Thanks for the patch. I'll wait to see if someone from glibc reviews the change. I'll add some comments about the formatting for now. Cheers, Alex > --- > man2/ioctl_tty.2 | 17 +++++++++++++++-- > 1 file changed, 15 insertions(+), 2 deletions(-) > > diff --git a/man2/ioctl_tty.2 b/man2/ioctl_tty.2 > index c1875530f0b1..91aceddb7828 100644 > --- a/man2/ioctl_tty.2 > +++ b/man2/ioctl_tty.2 > @@ -11,8 +11,8 @@ ioctl_tty \- ioctls for terminals and serial lines > .SH SYNOPSIS > .nf > .B #include > -.BR "#include " " /* Definition of " CLOCAL ", and" > -.BR " TC*" { FLUSH , ON , OFF "} constants */" > +.BR "#include " " /* Definition of " struct " " termios ", " struct " " termios2 "," A single space between tokens is enough: s/>" "/>" "/ Join related tokens: s/struct " " termios/"struct termios"/ Tokens without spaces don't need quoting: s/","$/,/ > +.BR " " " " BOTHER ", " CLOCAL ", and " TC* { FLUSH , ON , OFF "} constants */" Please format everything into at most 80 columns, and preferably 78. Right now I see: [ SYNOPSIS #include #include /* Definition of struct termios, struct termios2, BOTHER, CLOCAL, and TC*{FLUSH,ON,OFF} constants */ int ioctl(int fd, int cmd, ...); ] Maybe break between the 2 structs, and after that "and". Also, I'd add an "and" just before the constants to make clear that "constants" only applies to them. > .PP > .BI "int ioctl(int " fd ", int " cmd ", ...);" > .fi > @@ -31,6 +31,19 @@ makes for nonportable programs. > Use the POSIX interface described in > .BR termios (3) > whenever possible. > +.PP > +Please note that > +.B struct termios > +from > +.B #include > +is different and incompatible with > +.B struct termios > +from > +.BR "#include " . > +These ioctl calls require > +.B struct termios > +from > +.BR "#include " . > .SS Get and set terminal attributes > .TP > .B TCGETS > -- Alejandro Colomar Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ http://www.alejandro-colomar.es/