]> code.ossystems Code Review - openembedded-core.git/blob
48b3c56158f828914cc955ab39e7ca54ac4b2064
[openembedded-core.git] /
1 Upstream-Status: Submitted
2
3
4 From 4b2716f902c117490285e39deb6ef7925fdc846e Mon Sep 17 00:00:00 2001
5 From: Khem Raj <raj.khem@gmail.com>
6 Date: Sat, 8 Sep 2012 19:54:03 -0700
7 Subject: [PATCH] Add name_to_handle_at, open_by_handle etc. to PowerPC
8  bits/fcntl.h.
9
10 ---
11  ChangeLog                                    |    7 +++++++
12  sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h |   28 +++++++++++++++++++++++++-
13  2 files changed, 34 insertions(+), 1 deletion(-)
14
15 Index: libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
16 ===================================================================
17 --- libc.orig/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h      2012-09-08 10:27:08.000000000 -0700
18 +++ libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h   2012-09-08 19:57:44.219191560 -0700
19 @@ -1,5 +1,5 @@
20  /* O_*, F_*, FD_* bit values for Linux/PowerPC.
21 -   Copyright (C) 1995-1998, 2000, 2003, 2004, 2006, 2007, 2009, 2010, 2011
22 +   Copyright (C) 1995-2012
23     Free Software Foundation, Inc.
24     This file is part of the GNU C Library.
25  
26 @@ -232,6 +232,19 @@
27                                            we splice from/to).  */
28  # define SPLICE_F_MORE         4       /* Expect more data.  */
29  # define SPLICE_F_GIFT         8       /* Pages passed in are a gift.  */
30 +
31 +
32 +/* File handle structure.  */
33 +struct file_handle
34 +{
35 +  unsigned int handle_bytes;
36 +  int handle_type;
37 +  /* File identifier.  */
38 +  unsigned char f_handle[0];
39 +};
40 +
41 +/* Maximum handle size (for now).  */
42 +# define MAX_HANDLE_SZ  128
43  #endif
44  
45  __BEGIN_DECLS
46 @@ -278,6 +291,19 @@
47                         __off64_t __len);
48  # endif
49  
50 +
51 +/* Map file name to file handle.  */
52 +extern int name_to_handle_at (int __dfd, const char *__name,
53 +                             struct file_handle *__handle, int *__mnt_id,
54 +                             int __flags) __THROW;
55 +
56 +/* Open file using the file handle.
57 +
58 +   This function is a possible cancellation point and therefore not
59 +   marked with __THROW.  */
60 +extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
61 +                             int __flags);
62 +
63  #endif
64  
65  __END_DECLS