From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A00E3C43387 for ; Tue, 1 Jan 2019 09:42:52 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E07DA208E3 for ; Tue, 1 Jan 2019 09:42:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=crashcourse.ca header.i=@crashcourse.ca header.b="h2m4lafh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E07DA208E3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=crashcourse.ca Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.91) (envelope-from ) id 1geGZC-00083S-PD; Tue, 01 Jan 2019 04:42:30 -0500 Received: from cpanel4.indieserve.net ([199.212.143.9]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1geGZ9-00083K-O0 for kernelnewbies@kernelnewbies.org; Tue, 01 Jan 2019 04:42:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=crashcourse.ca; s=default; h=Content-Type:MIME-Version:References: Message-ID:In-Reply-To:Subject:cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=z1PB4m8yxLjBekerNgSdbXqlqXIoX5jk1Bx+EdVECbA=; b=h2m4lafhOjcQ3rkgOiEaeoeTk +gq2ADYhcy3JlklkWoHHDKjol95kJ8IMZuWlrxUj/dq1JX0//HM7chq8+QQ0IjCwQf5UfULXCPUjM mWKCuhkTYNfeV/ExvoDXUp0NByCTX3m0AV7QAOOuBdsvWSjeX6411BLL9dyV/0xA0xSXpohH3PLr9 e/hakmIMCqgi+YDviT9VS1cmkF9Vzy6wUuW54K/wp2MnHilqmlWVB7SEM/W6p0vT+nJ4NSRSfDEd5 rYlciwTweN/esCobVx6hI63PpkQq6SZ26gxYWSroqYwuJsGfUQiPpNYAzMH/GHR4b3cs+EFWAZAtI QDVAOvqcQ==; Received: from cpef81d0f814063-cmf81d0f814060.cpe.net.cable.rogers.com ([174.114.57.56]:43678 helo=localhost.localdomain) by cpanel4.indieserve.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1geGZ5-00GuJx-Mn; Tue, 01 Jan 2019 04:42:24 -0500 Date: Tue, 1 Jan 2019 04:41:30 -0500 (EST) From: "Robert P. J. Day" X-X-Sender: rpjday@localhost.localdomain To: valdis.kletnieks@vt.edu Subject: Re: why are some stat.h "S_*" perm macros not exported via uapi? In-Reply-To: <9205.1546303487@turing-police.cc.vt.edu> Message-ID: References: <9205.1546303487@turing-police.cc.vt.edu> User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 X-OutGoing-Spam-Status: No, score=-0.2 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel4.indieserve.net X-AntiAbuse: Original Domain - kernelnewbies.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - crashcourse.ca X-Get-Message-Sender-Via: cpanel4.indieserve.net: authenticated_id: rpjday+crashcourse.ca/only user confirmed/virtual account not confirmed X-Authenticated-Sender: cpanel4.indieserve.net: rpjday@crashcourse.ca X-Source: X-Source-Args: X-Source-Dir: Cc: Kernel Newbies X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Mon, 31 Dec 2018, valdis.kletnieks@vt.edu wrote: > On Mon, 31 Dec 2018 14:53:30 -0500, "Robert P. J. Day" said: > > > #define S_IRWXUGO (S_IRWXU|S_IRWXG|S_IRWXO) > > #define S_IALLUGO (S_ISUID|S_ISGID|S_ISVTX|S_IRWXUGO) > > #define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH) > > #define S_IWUGO (S_IWUSR|S_IWGRP|S_IWOTH) > > #define S_IXUGO (S_IXUSR|S_IXGRP|S_IXOTH) > > Can you give an actual non-contrived example of code where one of > these would be preferable to inline coding the mask? And do you plan > to include all the various combos? And why should that be done in > the uapi headers, rather than glibc/musl/other_c_lib providing it? ... snip ... i am not *defending* the above macros, simply pointing out that, unlike all the other simpler macros that *are* exported via uapi, these are left all by their lonesome in kernel space. i'm just wondering if there's a reason for that. rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca/dokuwiki Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ======================================================================== _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies