aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2012-02-15 12:16:31 -0800
committerRichard Henderson <rth@twiddle.net>2012-02-15 12:19:47 -0800
commit4c85d632e4f9782a2abf0d99cb159c960adcba1d (patch)
treece5ff7166e60e52f005c246da2476f267db4098a
parent7865d19cf68bcfb32c12fa3e7ce6a85fb4738383 (diff)
downloadglibc-4c85d632e4f9782a2abf0d99cb159c960adcba1d.tar.xz
glibc-4c85d632e4f9782a2abf0d99cb159c960adcba1d.zip
BZ #13361
alpha: More Linux additions copied from generic/bits/fcntl.h.
-rw-r--r--ChangeLog.alpha6
-rw-r--r--sysdeps/unix/sysv/linux/alpha/bits/fcntl.h46
2 files changed, 51 insertions, 1 deletions
diff --git a/ChangeLog.alpha b/ChangeLog.alpha
index a5271de425..08d2c31b70 100644
--- a/ChangeLog.alpha
+++ b/ChangeLog.alpha
@@ -1,3 +1,9 @@
+2012-02-15 Richard Henderson <rth@twiddle.net>
+
+ [BZ #13361]
+ * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (struct file_handle): New.
+ (fallocate, name_to_handle_at, open_by_handle_at): Declare.
+
2012-02-14 Joseph Myers <joseph@codesourcery.com>
Tom de Vries <tom@codesourcery.com>
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index e5e726bf4c..d1cebfa684 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995-2000,2004,2005,2006,2007,2010 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -223,6 +223,18 @@ 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
@@ -252,6 +264,38 @@ extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
extern ssize_t tee (int __fdin, int __fdout, size_t __len,
unsigned int __flags);
+/* Reserve storage for the data of the file associated with FD.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+# ifndef __USE_FILE_OFFSET64
+extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+ __off64_t __len),
+ fallocate64);
+# else
+# define fallocate fallocate64
+# endif
+# endif
+# ifdef __USE_LARGEFILE64
+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