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

Side by Side Diff: src/trusted/desc/nacl_desc_io.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/trusted/desc/nacl_desc_invalid.c ('k') | src/trusted/desc/nacl_desc_mutex.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) 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. I/O Descriptor / Handle abstraction. Memory 8 * NaCl Service Runtime. I/O Descriptor / Handle abstraction. Memory
9 * mapping using descriptors. 9 * mapping using descriptors.
10 */ 10 */
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 int rv; 288 int rv;
289 nacl_host_stat_t hstatbuf; 289 nacl_host_stat_t hstatbuf;
290 290
291 rv = NaClHostDescFstat(self->hd, &hstatbuf); 291 rv = NaClHostDescFstat(self->hd, &hstatbuf);
292 if (0 != rv) { 292 if (0 != rv) {
293 return rv; 293 return rv;
294 } 294 }
295 return NaClAbiStatHostDescStatXlateCtor(statbuf, &hstatbuf); 295 return NaClAbiStatHostDescStatXlateCtor(statbuf, &hstatbuf);
296 } 296 }
297 297
298 static int NaClDescIoDescFchmod(struct NaClDesc *vself,
299 int mode) {
300 struct NaClDescIoDesc *self = (struct NaClDescIoDesc *) vself;
301 return NaClHostDescFchmod(self->hd, mode);
302 }
303
304 static int NaClDescIoDescFsync(struct NaClDesc *vself) {
305 struct NaClDescIoDesc *self = (struct NaClDescIoDesc *) vself;
306
307 return NaClHostDescFsync(self->hd);
308 }
309
310 static int NaClDescIoDescFdatasync(struct NaClDesc *vself) {
311 struct NaClDescIoDesc *self = (struct NaClDescIoDesc *) vself;
312
313 return NaClHostDescFdatasync(self->hd);
314 }
315
316 static int NaClDescIoDescFtruncate(struct NaClDesc *vself,
317 nacl_abi_off_t length) {
318 struct NaClDescIoDesc *self = (struct NaClDescIoDesc *) vself;
319
320 return NaClHostDescFtruncate(self->hd, length);
321 }
322
298 static int32_t NaClDescIoIsatty(struct NaClDesc *vself) { 323 static int32_t NaClDescIoIsatty(struct NaClDesc *vself) {
299 struct NaClDescIoDesc *self = (struct NaClDescIoDesc *) vself; 324 struct NaClDescIoDesc *self = (struct NaClDescIoDesc *) vself;
300 325
301 return NaClHostDescIsatty(self->hd); 326 return NaClHostDescIsatty(self->hd);
302 } 327 }
303 328
304 static int NaClDescIoDescExternalizeSize(struct NaClDesc *vself, 329 static int NaClDescIoDescExternalizeSize(struct NaClDesc *vself,
305 size_t *nbytes, 330 size_t *nbytes,
306 size_t *nhandles) { 331 size_t *nhandles) {
307 struct NaClDescIoDesc *self = (struct NaClDescIoDesc *) vself; 332 struct NaClDescIoDesc *self = (struct NaClDescIoDesc *) vself;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 NaClDescIoDescUnmapUnsafe, 375 NaClDescIoDescUnmapUnsafe,
351 #else 376 #else
352 NACL_DESC_UNMAP_NOT_IMPLEMENTED 377 NACL_DESC_UNMAP_NOT_IMPLEMENTED
353 #endif 378 #endif
354 NaClDescIoDescRead, 379 NaClDescIoDescRead,
355 NaClDescIoDescWrite, 380 NaClDescIoDescWrite,
356 NaClDescIoDescSeek, 381 NaClDescIoDescSeek,
357 NaClDescIoDescPRead, 382 NaClDescIoDescPRead,
358 NaClDescIoDescPWrite, 383 NaClDescIoDescPWrite,
359 NaClDescIoDescFstat, 384 NaClDescIoDescFstat,
385 NaClDescFchdirNotImplemented,
386 NaClDescIoDescFchmod,
387 NaClDescIoDescFsync,
388 NaClDescIoDescFdatasync,
389 NaClDescIoDescFtruncate,
360 NaClDescGetdentsNotImplemented, 390 NaClDescGetdentsNotImplemented,
361 NaClDescIoDescExternalizeSize, 391 NaClDescIoDescExternalizeSize,
362 NaClDescIoDescExternalize, 392 NaClDescIoDescExternalize,
363 NaClDescLockNotImplemented, 393 NaClDescLockNotImplemented,
364 NaClDescTryLockNotImplemented, 394 NaClDescTryLockNotImplemented,
365 NaClDescUnlockNotImplemented, 395 NaClDescUnlockNotImplemented,
366 NaClDescWaitNotImplemented, 396 NaClDescWaitNotImplemented,
367 NaClDescTimedWaitAbsNotImplemented, 397 NaClDescTimedWaitAbsNotImplemented,
368 NaClDescSignalNotImplemented, 398 NaClDescSignalNotImplemented,
369 NaClDescBroadcastNotImplemented, 399 NaClDescBroadcastNotImplemented,
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 cleanup: 495 cleanup:
466 if (rv < 0) { 496 if (rv < 0) {
467 free(nhdp); 497 free(nhdp);
468 free(ndidp); 498 free(ndidp);
469 if (NACL_INVALID_HANDLE != h) { 499 if (NACL_INVALID_HANDLE != h) {
470 (void) NaClClose(h); 500 (void) NaClClose(h);
471 } 501 }
472 } 502 }
473 return rv; 503 return rv;
474 } 504 }
OLDNEW
« no previous file with comments | « src/trusted/desc/nacl_desc_invalid.c ('k') | src/trusted/desc/nacl_desc_mutex.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698