aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/eglibc/eglibc-2.16/0001-Add-name_to_handle_at-open_by_handle-etc.-to-PowerPC.patch
blob: 48b3c56158f828914cc955ab39e7ca54ac4b2064 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Upstream-Status: Submitted


From 4b2716f902c117490285e39deb6ef7925fdc846e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 8 Sep 2012 19:54:03 -0700
Subject: [PATCH] Add name_to_handle_at, open_by_handle etc. to PowerPC
 bits/fcntl.h.

---
 ChangeLog                                    |    7 +++++++
 sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h |   28 +++++++++++++++++++++++++-
 2 files changed, 34 insertions(+), 1 deletion(-)

Index: libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
===================================================================
--- libc.orig/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h	2012-09-08 10:27:08.000000000 -0700
+++ libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h	2012-09-08 19:57:44.219191560 -0700
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux/PowerPC.
-   Copyright (C) 1995-1998, 2000, 2003, 2004, 2006, 2007, 2009, 2010, 2011
+   Copyright (C) 1995-2012
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -232,6 +232,19 @@
 					   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
@@ -278,6 +291,19 @@
 			__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