From owner-svn-src-head@freebsd.org Wed Sep 23 18:27:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AAA6C42281C; Wed, 23 Sep 2020 18:27:48 +0000 (UTC) (envelope-from xtouqh@hotmail.com) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04olkn080a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0d::80a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxRVp2kb3z42dM; Wed, 23 Sep 2020 18:27:46 +0000 (UTC) (envelope-from xtouqh@hotmail.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BtK1FeGtDDNo0eEHmIxzmcLwRd4Yp3PGifEAQ50MAqTvw23zSgrfJwKQXHY3lB2KOdo9YgtFOvaH+FRJ7bkAWZPg5VaXc94WE9FzelSCtVOwgCuUc3TNPWOTVhA4lEhhO83orcRvNfT6LWfTrdXVhemwHpok3u0BUuGx7wWdr70P+Q2sw8gcP76DfoNkYKkvwaPLIT6TCwbQH2stoi8yzYEF/DGy1kLW9OoRMMpvwrP6YxvPcqowgGyunZACbNfGXMOBA5miPjIQwZBImd5gwR1JBmdKRWtjHbh1DNbarjMM9e0EtRBA6DzvSP3qrKIB7WDN6RQFLFPF53MLo7oxCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l5xqiXOg7cc5mFhzxsNsNvcds7EpA4mVq6ECDsugQHY=; b=SbUeL7+wTAhG48XAvG8HKxtrWWg9kW6zkt6Bab6e76H+nGZ+JYniIfhEJsWfUm7d3JpSeD5Al+WylAeE8Y4OFqywkG1DC/9//IzimsLYSsa+MWlsrAO45pAPW/aKlmUcdW+oNyebZJVnaZqAL9SIAypUV1bFz0FN/t35Nb90Fh6cmoDiaZdRgx59C/TuVjs6QLzIBoeSbR7rwBvUNbxAI1ZGxZGS3VDQl5V/j+25QcAi7qzW9dvl4RaEpt/Ojpzezs5ZNj6pJ96lZYszk5slQhHv3Ey/KGAaYne1P/S1GD7SlO84mBlDT78sqSKgpxNTB/LheGu9IY+MhIlU22SyFQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l5xqiXOg7cc5mFhzxsNsNvcds7EpA4mVq6ECDsugQHY=; b=PU3cP484rZAlHTZYwa7Q9U0jJD3XwXnSKX2Suc3g+CMlvAzHHnaKLpDjpm7kBjwBUvyLJEOIuSlyzdzwPxGbQdQ9EKE07AE8slR+JFN8H8mvgveUpaNumBrl79L0sxFUdQImJ22A/cwRCehO5pdC5S8gENO4k3bsR1I07wjDsJZRb9rMYg1aW4FFrylEqetjbFZHxfcyUBYmKPro7dwx3jQ2mIB1GNJQNBsO11jonXgAV3p8u1fJDuX9W80FX842aE0c022lx6G13qs7jhhFw7o61RGmci7rM3bn5QXbrpF6/bu0PmqBmAL2EoYL090sAjvJCl+CWSgHnOuVfj6jHg== Received: from HE1EUR04FT031.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::50) by HE1EUR04HT080.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.15; Wed, 23 Sep 2020 18:12:05 +0000 Received: from AM0PR06MB3986.eurprd06.prod.outlook.com (2a01:111:e400:7e0d::44) by HE1EUR04FT031.mail.protection.outlook.com (2a01:111:e400:7e0d::290) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.21 via Frontend Transport; Wed, 23 Sep 2020 18:12:05 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:4A29456AE8D4FAFED33885BD5353A0F8EAF4E148902069941C89E747CEE9BE72; UpperCasedChecksum:0EFBBCE35F65B80D4818F5E9ABE696B92FF3A1AE28633D1C710BFB38AA785416; SizeAsReceived:8751; Count:48 Received: from AM0PR06MB3986.eurprd06.prod.outlook.com ([fe80::9dd1:2866:7eae:1ccf]) by AM0PR06MB3986.eurprd06.prod.outlook.com ([fe80::9dd1:2866:7eae:1ccf%7]) with mapi id 15.20.3391.027; Wed, 23 Sep 2020 18:12:05 +0000 Subject: Re: svn commit: r366025 - head/share/man/man9 To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202009222301.08MN1rkh076778@repo.freebsd.org> From: xtouqh@hotmail.com Message-ID: Date: Wed, 23 Sep 2020 21:12:04 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 In-Reply-To: <202009222301.08MN1rkh076778@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: AM0PR06CA0144.eurprd06.prod.outlook.com (2603:10a6:208:ab::49) To AM0PR06MB3986.eurprd06.prod.outlook.com (2603:10a6:208:b6::28) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.6] (91.240.124.157) by AM0PR06CA0144.eurprd06.prod.outlook.com (2603:10a6:208:ab::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.14 via Frontend Transport; Wed, 23 Sep 2020 18:12:04 +0000 X-Microsoft-Original-Message-ID: X-TMN: [ZOh56D35yboGU1FRudpc2F4K6jj8Bkyw] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 16f7d7ca-49bb-4f26-3550-08d85fec2d28 X-MS-TrafficTypeDiagnostic: HE1EUR04HT080: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dX2LpRf4IbseReD0Woec0FirOdZ5HB5qluxXbKZuH+FApQJ/tbeLbsAjoyK97nGu9eAX1kPSLMwnA6cj3kL1Nkck37C60JECmjDdgnLEW95G2UtdGwRR1jeteK3GHNRAYRs1YZ8Q7GvnwShpHoZ1thjRDLuhUsoA8Z1rfwQKLkQfxnZN/r+Mg2gn6esI4DCJ0Err/UHQ4oDgLg8l34CTaY95ARMhDe14sctMjfCtfQbqTuaiekPfQnpxMH63q82/ X-MS-Exchange-AntiSpam-MessageData: Kumvn6gP9KV16Xxzmsrwzoo93rAwcWMehqWIrktV8XSJBAgFxUVfAQLmtXIMypZqYF0IEprWt+EHyAX1oPEcW74qYh4HWuqXM68Z4a0jgL5LEc54qiFARioiSAQj+4wWvF4aSAocNzK5Cft1/zsJiw== X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-Network-Message-Id: 16f7d7ca-49bb-4f26-3550-08d85fec2d28 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2020 18:12:04.9494 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: HE1EUR04FT031.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR04HT080 X-Rspamd-Queue-Id: 4BxRVp2kb3z42dM X-Spamd-Bar: +++++++++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hotmail.com header.s=selector1 header.b=PU3cP484; dmarc=pass (policy=none) header.from=hotmail.com; spf=pass (mx1.freebsd.org: domain of xtouqh@hotmail.com designates 2a01:111:f400:fe0d::80a as permitted sender) smtp.mailfrom=xtouqh@hotmail.com X-Spamd-Result: default: False [9.30 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[hotmail.com]; R_SPF_ALLOW(0.00)[+ip6:2a01:111:f400::/48]; DKIM_TRACE(0.00)[hotmail.com:+]; DMARC_POLICY_ALLOW(0.00)[hotmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[hotmail.com]; ASN(0.00)[asn:8075, ipnet:2a01:111:f000::/36, country:US]; FORGED_MUA_THUNDERBIRD_MSGID_UNKNOWN(2.50)[]; ARC_ALLOW(0.00)[microsoft.com:s=arcselector9901:i=1]; DWL_DNSWL_NONE(0.00)[hotmail.com:dkim]; RECEIVED_SPAMHAUS_XBL(5.00)[91.240.124.157:received]; R_DKIM_ALLOW(0.00)[hotmail.com:s=selector1]; RCVD_COUNT_FIVE(0.00)[5]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.09)[-0.095]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_SHORT(1.40)[1.399]; NEURAL_SPAM_MEDIUM(0.50)[0.496]; BAD_REP_POLICIES(0.10)[]; FROM_NO_DN(0.00)[]; GREYLIST(0.00)[pass,body]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all] X-Spam: Yes X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2020 18:27:48 -0000 Warner Losh wrote: > Author: imp > Date: Tue Sep 22 23:01:53 2020 > New Revision: 366025 > URL: https://svnweb.freebsd.org/changeset/base/366025 > > Log: > Document devctl_safe_quote_sb > > This routine centralizes the knowledge needed for properly quoting > 'value' in all key="value" items that appear in devctl messages. > > Reviewed by: bcr > Differential Revision: https://reviews.freebsd.org/D26520 > > Added: > head/share/man/man9/devctl_safe_quote_sb.9 (contents, props changed) > Modified: > head/share/man/man9/Makefile > > Modified: head/share/man/man9/Makefile > ============================================================================== > --- head/share/man/man9/Makefile Tue Sep 22 23:01:44 2020 (r366024) > +++ head/share/man/man9/Makefile Tue Sep 22 23:01:53 2020 (r366025) > @@ -122,6 +122,8 @@ MAN= accept_filter.9 \ > DEV_MODULE.9 \ > dev_refthread.9 \ > devctl_process_running.9 \ > + devctl_safe_quote_sb.9 \ > + devctl_ > devstat.9 \ > devtoname.9 \ > disk.9 \ > > Added: head/share/man/man9/devctl_safe_quote_sb.9 > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/share/man/man9/devctl_safe_quote_sb.9 Tue Sep 22 23:01:53 2020 (r366025) > @@ -0,0 +1,57 @@ > +.\" > +.\" Copyright (c) 2020 M Warner Losh > +.\" > +.\" This program is free software. > +.\" > +.\" Redistribution and use in source and binary forms, with or without > +.\" modification, are permitted provided that the following conditions > +.\" are met: > +.\" 1. Redistributions of source code must retain the above copyright > +.\" notice, this list of conditions and the following disclaimer. > +.\" 2. Redistributions in binary form must reproduce the above copyright > +.\" notice, this list of conditions and the following disclaimer in the > +.\" documentation and/or other materials provided with the distribution. > +.\" > +.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR > +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES > +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. > +.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, > +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT > +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF > +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > +.\" > +.\" $FreeBSD$ > +.\" > +.Dd September 22, 2020 > +.Dt DEVCTL_SAFE_QUOTE_SB 9 > +.Os > +.Sh NAME > +.Nm devctl_safe_quote_sb > +.Nd Insert a string, properly quoted, into a sbuf > +.Sh SYNOPSIS > +.In sys/devctl.h > +.In sys/sbuf.h > +.Ft void > +.Fn devctl_safe_quote_sb "struct sbuf *sb" "const char *src" > +.Sh DESCRIPTION > +Copy the string from > +.Vn src .Va > +into > +.Vn sb . .Va > +All backslash characters are doubled. > +All double quote characters > +.Sq " .Sq \&" > +are also preceded by a backslash. > +All other characters are copied without modification. > +The > +.Xr devctl 4 > +protocol requires quoted string to be quoted thus. > +This routine centralizes this knowledge. > +.Sh SEE ALSO > +.Xr devd 8 > +.Sh AUTHORS > +This manual page was written by > +.An M. Warner Losh