From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 091C85101B; Thu, 30 Nov 2023 14:59:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="EaAkL/XZ" 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> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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