Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Side by Side Diff: src/untrusted/irt/irt_dev.h

Issue 1235633004: DON'T USE THIS -- Providing some missing POSIX File syscalls. (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/trusted/service_runtime/sys_filename.c ('k') | src/untrusted/irt/irt_fdio.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2013 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 #ifndef NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_DEV_H_ 6 #ifndef NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_DEV_H_
7 #define NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_DEV_H_ 7 #define NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_DEV_H_
8 8
9 #include <stdarg.h> 9 #include <stdarg.h>
10 #include <stddef.h> 10 #include <stddef.h>
11 #include <sys/types.h> 11 #include <sys/types.h>
12 #include <utime.h>
12 13
13 /* Use relative path so that irt_dev.h can be installed as a system header. */ 14 /* Use relative path so that irt_dev.h can be installed as a system header. */
14 #include "irt.h" 15 #include "irt.h"
15 16
16 /* 17 /*
17 * This header file is for IRT interfaces that are only available in 18 * This header file is for IRT interfaces that are only available in
18 * Chromium behind a flag, or are not available in Chromium at all. 19 * Chromium behind a flag, or are not available in Chromium at all.
19 * 20 *
20 * For example, the filesystem interfaces and getpid() are only 21 * For example, the filesystem interfaces and getpid() are only
21 * available when the env var NACL_DANGEROUS_ENABLE_FILE_ACCESS is 22 * available when the env var NACL_DANGEROUS_ENABLE_FILE_ACCESS is
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 */ 78 */
78 #define NACL_IRT_DEV_FILENAME_v0_2 "nacl-irt-dev-filename-0.2" 79 #define NACL_IRT_DEV_FILENAME_v0_2 "nacl-irt-dev-filename-0.2"
79 struct nacl_irt_dev_filename_v0_2 { 80 struct nacl_irt_dev_filename_v0_2 {
80 int (*open)(const char *pathname, int oflag, mode_t cmode, int *newfd); 81 int (*open)(const char *pathname, int oflag, mode_t cmode, int *newfd);
81 int (*stat)(const char *pathname, struct stat *); 82 int (*stat)(const char *pathname, struct stat *);
82 int (*mkdir)(const char *pathname, mode_t mode); 83 int (*mkdir)(const char *pathname, mode_t mode);
83 int (*rmdir)(const char *pathname); 84 int (*rmdir)(const char *pathname);
84 int (*chdir)(const char *pathname); 85 int (*chdir)(const char *pathname);
85 int (*getcwd)(char *pathname, size_t len); 86 int (*getcwd)(char *pathname, size_t len);
86 int (*unlink)(const char *pathname); 87 int (*unlink)(const char *pathname);
88 int (*truncate)(const char *pathname, nacl_irt_off_t length);
89 int (*lstat)(const char *pathname, struct stat *);
90 int (*link)(const char *oldpath, const char *newpath);
91 int (*rename)(const char *oldpath, const char *newpath);
92 int (*symlink)(const char *oldpath, const char *newpath);
93 int (*chmod)(const char *path, mode_t mode);
94 int (*access)(const char *path, int amode);
95 int (*readlink)(const char *path, char *buf, size_t count, size_t *nread);
96 int (*utimes)(const char *filename, const struct timeval *times);
87 }; 97 };
88 98
89 #define NACL_IRT_DEV_FILENAME_v0_3 "nacl-irt-dev-filename-0.3" 99 #define NACL_IRT_DEV_FILENAME_v0_3 "nacl-irt-dev-filename-0.3"
90 struct nacl_irt_dev_filename { 100 struct nacl_irt_dev_filename {
91 int (*open)(const char *pathname, int oflag, mode_t cmode, int *newfd); 101 int (*open)(const char *pathname, int oflag, mode_t cmode, int *newfd);
92 int (*stat)(const char *pathname, struct stat *); 102 int (*stat)(const char *pathname, struct stat *);
93 int (*mkdir)(const char *pathname, mode_t mode); 103 int (*mkdir)(const char *pathname, mode_t mode);
94 int (*rmdir)(const char *pathname); 104 int (*rmdir)(const char *pathname);
95 int (*chdir)(const char *pathname); 105 int (*chdir)(const char *pathname);
96 int (*getcwd)(char *pathname, size_t len); 106 int (*getcwd)(char *pathname, size_t len);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 struct nacl_irt_private_pnacl_translator_compile { 201 struct nacl_irt_private_pnacl_translator_compile {
192 void (*serve_translate_request)( 202 void (*serve_translate_request)(
193 const struct nacl_irt_pnacl_compile_funcs *funcs); 203 const struct nacl_irt_pnacl_compile_funcs *funcs);
194 }; 204 };
195 205
196 #if defined(__cplusplus) 206 #if defined(__cplusplus)
197 } 207 }
198 #endif 208 #endif
199 209
200 #endif /* NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_DEV_H */ 210 #endif /* NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_DEV_H */
OLDNEW
« no previous file with comments | « src/trusted/service_runtime/sys_filename.c ('k') | src/untrusted/irt/irt_fdio.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698