From 91456166c51940caeecf2f3edc460deb689f82a4 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 3 Apr 2011 23:58:21 +0200 Subject: [PATCH] m68k: declare name_to_handle_at and open_by_handle_at in bits/fcntl.h --- ChangeLog.m68k | 2 ++ sysdeps/unix/sysv/linux/m68k/bits/fcntl.h | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 779dba1..ad78ade 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -2,6 +2,8 @@ * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Update comments. (O_PATH): Define. + (struct file_handle, MAX_HANDLE_SZ): Define. + (name_to_handle_at, open_by_handle_at): Declare. 2011-03-06 Andreas Schwab diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h index aecf214..54363b6 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h @@ -232,6 +232,19 @@ struct f_owner_ex we splice from/to). */ # define SPLICE_F_MORE 4 /* Expect more data. */ # define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */ + + +/* File handle structure. */ +struct file_handle +{ + unsigned int handle_bytes; + int handle_type; + /* File identifier. */ + unsigned char f_handle[0]; +}; + +/* Maximum handle size (for now). */ +# define MAX_HANDLE_SZ 128 #endif __BEGIN_DECLS @@ -290,6 +303,19 @@ extern int fallocate64 (int __fd, int __mode, __off64_t __offset, __off64_t __len); # endif + +/* Map file name to file handle. */ +extern int name_to_handle_at (int __dfd, const char *__name, + struct file_handle *__handle, int *__mnt_id, + int __flags) __THROW; + +/* Open file using the file handle. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle, + int __flags); + #endif __END_DECLS -- 2.7.4