From owner-svn-src-head@freebsd.org Fri Sep 27 18:32:22 2019 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 BDAF3129960; Fri, 27 Sep 2019 18:32:22 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-ot1-x32f.google.com (mail-ot1-x32f.google.com [IPv6:2607:f8b0:4864:20::32f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46g0lB4YCZz48Jt; Fri, 27 Sep 2019 18:32:22 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-ot1-x32f.google.com with SMTP id y39so3078868ota.7; Fri, 27 Sep 2019 11:32:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Cc3vFFIt9JmZgjxK8g6wpzAwMLkQrJRd4/h8go8t1L8=; b=U37l3TffI0oirvec1grKglgX3YcsqAwzGUGZM5/u95byUDGHJBC2pLJInsSc6pvAAU y5r5UokXyqUet/WdUS2WUI+sF8vg3PqLI6Sd6sP3WgmldkJwaMF5POATyncicFYEWJCN amuj6FcPQuXb7Mydtedm6VeBwEF1roh4SldJHlpFpXK3K76Zb08LvSoppcb7g+09B053 S4vwCR5N5vTvK5q221Ebi0er3gyUkLbBJQeqvxb0CcCW+Medr+MmuoiW3H0cnmOO/yS+ rXEkV43EgrnkwJfnD/7mOn+U8vifY0WCtyQtPKIMxgX4hStG/udrKheoAMrLfuIbqWfS h2KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Cc3vFFIt9JmZgjxK8g6wpzAwMLkQrJRd4/h8go8t1L8=; b=DI3fT0xhTUaUnhdkH4sBr5Su5VumDQ15H1/Bcg0r6Wy1m7tFkJWmntZQsYdQa7C4Lp v11+Qxf5aEtWb4Jb/1Lg5e57FhSJaiplqH047hf8HOuTUVq/qF5mqOECGSq53dPNpoHM VQjI3govhj7cnjMzgRS+mTcEYAybB0rcJL3a07reSDeSwLNTjqTUKbwovPPbDu4OnNIo C/tbn4woZYEZFUTiupO/NB1dpECmcXOE7t14Y7HL0x2i5mPOnQDf4qP1vCfzs9PsQeSz HVsN4NUI0l/wSEtxMKcmx/v7CFW09E2mhU9RyKuRJql7oxmsdygh40ypy8jJ4h70vmU6 zh/Q== X-Gm-Message-State: APjAAAXkPEEgCzCf21dlTztv0h5oqAECPv3alTn86Wx2iPzWtyi8gHEL cFhz2JFdgNWbnyzHDz+cCrpoujFkLt9Xd4B6/H5pog== X-Google-Smtp-Source: APXvYqyX4fXVCBjLF0Pih7BpYVCDQ5db7ib8niSjnnHozrRC9dXTrTE4dKt01zmkKcNFS2qdIfCCQY07/KB3GFkOYTA= X-Received: by 2002:a9d:61d0:: with SMTP id h16mr4136363otk.84.1569609141138; Fri, 27 Sep 2019 11:32:21 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4a:458d:0:0:0:0:0 with HTTP; Fri, 27 Sep 2019 11:32:20 -0700 (PDT) In-Reply-To: <201909271611.x8RGBl0H036116@repo.freebsd.org> References: <201909271611.x8RGBl0H036116@repo.freebsd.org> From: Mateusz Guzik Date: Fri, 27 Sep 2019 20:32:20 +0200 Message-ID: Subject: Re: svn commit: r352795 - head/lib/libc/sys To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 46g0lB4YCZz48Jt X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 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: Fri, 27 Sep 2019 18:32:22 -0000 On 9/27/19, Warner Losh wrote: > Author: imp > Date: Fri Sep 27 16:11:47 2019 > New Revision: 352795 > URL: https://svnweb.freebsd.org/changeset/base/352795 > > Log: > Document varadic args as int, since you can't have short varadic args > (they are > promoted to ints). > > - `mode_t` is `uint16_t` (`sys/sys/_types.h`) > - `openat` takes variadic args > - variadic args cannot be 16-bit, and indeed the code uses int > - the manpage currently kinda implies the argument is 16-bit by saying > `mode_t` > > Prompted by Rust things: https://github.com/tailhook/openat/issues/21 > Submitted by: Greg V at unrelenting > Differential Revision: https://reviews.freebsd.org/D21816 > > Modified: > head/lib/libc/sys/mq_open.2 > head/lib/libc/sys/open.2 > > Modified: head/lib/libc/sys/mq_open.2 > ============================================================================== > --- head/lib/libc/sys/mq_open.2 Fri Sep 27 15:28:30 2019 (r352794) > +++ head/lib/libc/sys/mq_open.2 Fri Sep 27 16:11:47 2019 (r352795) > @@ -133,7 +133,7 @@ Create a message queue. > It requires two additional arguments: > .Fa mode , > which is of type > -.Vt mode_t , > +.Vt int , > and > .Fa attr , > which is a pointer to an > > Modified: head/lib/libc/sys/open.2 > ============================================================================== > --- head/lib/libc/sys/open.2 Fri Sep 27 15:28:30 2019 (r352794) > +++ head/lib/libc/sys/open.2 Fri Sep 27 16:11:47 2019 (r352795) > @@ -61,7 +61,7 @@ In this case > and > .Fn openat > require an additional argument > -.Fa "mode_t mode" , > +.Fa "int mode" , > and the file is created with mode > .Fa mode > as described in > But opengroup says it is mode_t. Perhaps it is mode_t which needs to be changed? -- Mateusz Guzik