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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D85CC4167B for ; Thu, 30 Nov 2023 14:59:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235199AbjK3O7X (ORCPT ); Thu, 30 Nov 2023 09:59:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235209AbjK3O7N (ORCPT ); Thu, 30 Nov 2023 09:59:13 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D802E10E0 for ; Thu, 30 Nov 2023 06:59:19 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C00CC433C9; Thu, 30 Nov 2023 14:59:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1701356359; bh=4fiGBwCCoFqjO3KZXyIpzKiASI2rPcIXwZNzyTktkpA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EaAkL/XZTwKwRzVpy3kyiH/Lgdo2rHYmA5LkUKxi5qdrEryzwV7yKgdYilI79Sz1u lXqxhpqxppT4XC4x4hl1bZBsCGY8MZwq3PmgG4LNKy5YXaACJdghUPbHE+oL2eOIut 9y1iNDC354gSoIthoCH2iz019qiYzMToRy0TS0Ls= Date: Thu, 30 Nov 2023 14:59:17 +0000 From: Greg Kroah-Hartman To: Benno Lossin Cc: Alice Ryhl , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Andreas Hindborg , Peter Zijlstra , Alexander Viro , Christian Brauner , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Carlos Llamas , Suren Baghdasaryan , Dan Williams , Kees Cook , Matthew Wilcox , Thomas Gleixner , Daniel Xu , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 1/7] rust: file: add Rust abstraction for `struct file` Message-ID: <2023113041-bring-vagrancy-a417@gregkh> References: <20231129-alice-file-v1-0-f81afe8c7261@google.com> <20231129-alice-file-v1-1-f81afe8c7261@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 30, 2023 at 02:53:35PM +0000, Benno Lossin wrote: > On 11/29/23 13:51, Alice Ryhl wrote: > > +/// Flags associated with a [`File`]. > > +pub mod flags { > > + /// File is opened in append mode. > > + pub const O_APPEND: u32 = bindings::O_APPEND; > > Why do all of these constants begin with `O_`? Because that is how they are defined in the kernel in the C code. Why would they not be the same here? thanks, greg k-h