aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2011-04-03 23:58:21 +0200
committerAndreas Schwab <schwab@linux-m68k.org>2011-04-03 23:58:21 +0200
commit91456166c51940caeecf2f3edc460deb689f82a4 (patch)
tree0b75f20089d54a8af4e13635874794841b2c3801
parentece7d80e58bcdc7ac02105099cda06a0b1b4918c (diff)
downloadglibc-91456166c51940caeecf2f3edc460deb689f82a4.tar.xz
glibc-91456166c51940caeecf2f3edc460deb689f82a4.zip
m68k: declare name_to_handle_at and open_by_handle_at in bits/fcntl.h
-rw-r--r--ChangeLog.m68k2
-rw-r--r--sysdeps/unix/sysv/linux/m68k/bits/fcntl.h26
2 files changed, 28 insertions, 0 deletions
diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index 779dba170d..ad78ade760 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 <schwab@linux-m68k.org>
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
index aecf214cee..54363b6a24 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