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

Side by Side Diff: src/shared/platform/win/nacl_host_dir.c

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, 5 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/shared/platform/win/nacl_host_desc.c ('k') | src/trusted/desc/nacl_desc_base.h » ('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) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 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 6
7 /* 7 /*
8 * NaCl Service Runtime. Directory descriptor / Handle abstraction. 8 * NaCl Service Runtime. Directory descriptor / Handle abstraction.
9 */ 9 */
10 #include "native_client/src/include/portability.h" 10 #include "native_client/src/include/portability.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 int NaClHostDirClose(struct NaClHostDir *d) { 263 int NaClHostDirClose(struct NaClHostDir *d) {
264 if (NULL == d) { 264 if (NULL == d) {
265 NaClLog(LOG_FATAL, "NaClHostDirClose: 'this' is NULL\n"); 265 NaClLog(LOG_FATAL, "NaClHostDirClose: 'this' is NULL\n");
266 } 266 }
267 NaClMutexDtor(&d->mu); 267 NaClMutexDtor(&d->mu);
268 if (!FindClose(d->handle)) { 268 if (!FindClose(d->handle)) {
269 return -NaClXlateSystemError(GetLastError()); 269 return -NaClXlateSystemError(GetLastError());
270 } 270 }
271 return 0; 271 return 0;
272 } 272 }
273
274 int NaClHostDirFchdir(struct NaClHostDir *d) {
275 NaClLog(1, "NaClHostDirFchdir Not yet implemented.\n");
276 /* TODO(smklein) Implement this function */
277
278 return -NACL_ABI_EINVAL;
279 }
280
281 int NaClHostDirFchmod(struct NaClHostDir *d, int mode) {
282 NaClLog(1, "NaClHostDirFchmod Not yet implemented.\n");
283 /* TODO(smklein) Implement this function */
284
285 return -NACL_ABI_EINVAL;
286 }
287
288 int NaClHostDirFsync(struct NaClHostDir *d) {
289 DWORD err;
290
291 if (!FlushFileBuffers(d->handle)) {
292 err = GetLastError();
293 return -NaClXlateSystemError(err);
294 }
295
296 return 0;
297 }
298
299 int NaClHostDirFdatasync(struct NaClHostDir *d) {
300 DWORD err;
301
302 if (!FlushFileBuffers(d->handle)) {
303 err = GetLastError();
304 return -NaClXlateSystemError(err);
305 }
306
307 return 0;
308 }
OLDNEW
« no previous file with comments | « src/shared/platform/win/nacl_host_desc.c ('k') | src/trusted/desc/nacl_desc_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698