On 4/26/24 00:03, Al Viro wrote:
On Thu, Apr 25, 2024 at 11:58:03PM +0200, Dawid Osuchowski wrote:
+struct file *anon_inode_getfile_fmode(const char *name,
+ const struct file_operations *fops,
+ void *priv, int flags, fmode_t f_mode)
^^^^^^^
+struct file *anon_inode_getfile_fmode(const char *name,
+ const struct file_operations *fops,
+ void *priv, int flags, unsigned int f_mode);
^^^^^^^^^^^^
They ought to match (and fmode_t is the right type here).
Should I include the <linux/fs.h> header (or a different one) into
anon_inodes.h to get the fmode_t type or can I copy the typedef directly
as a sort of "forward declare" instead?
The latter would mean something like this:
struct inode;
+ typedef unsigned int fmode_t;
-- Dawid