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

Side by Side Diff: mojo/services/files/public/c/mojio_fcntl.h

Issue 1388413005: Move //mojo/services/X/public/... to //mojo/services/X/... (part 1). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 2 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 | « mojo/services/files/public/c/mojio_config.h ('k') | mojo/services/files/public/c/mojio_stdio.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Partial <fcntl.h>-lookalike-ish. Note that this is a C header, so that crappy
6 // (and non-crappy) C programs can use it.
7 //
8 // In general, functions/types/macros are given "mojio_"/"MOJIO_"/etc. prefixes.
9 // There are a handful of exceptions (noted below).
10
11 #ifndef MOJO_SERVICES_FILES_PUBLIC_C_MOJIO_FCNTL_H_
12 #define MOJO_SERVICES_FILES_PUBLIC_C_MOJIO_FCNTL_H_
13
14 // Includes --------------------------------------------------------------------
15
16 #include "files/public/c/mojio_sys_types.h"
17
18 // Macros ----------------------------------------------------------------------
19
20 // Values for |mojio_fcntl()|'s |cmd| argument (not all are actually
21 // implemented):
22 #define MOJIO_F_DUPFD 0
23 #define MOJIO_F_GETFD 1
24 #define MOJIO_F_SETFD 2
25 #define MOJIO_F_GETFL 3
26 #define MOJIO_F_SETFL 4
27 #define MOJIO_F_GETLK 5
28 #define MOJIO_F_SETLK 6
29 #define MOJIO_F_SETLKW 7
30 #define MOJIO_F_GETOWN 8
31 #define MOJIO_F_SETOWN 9
32
33 // Values for |mojio_open()| and |mojio_fcntl()| flags:
34 #define MOJIO_O_ACCMODE 3 // MOJIO_O_RDONLY | MOJIO_O_RDWR | MOJIO_O_WRONLY.
35 #define MOJIO_O_RDONLY 0
36 #define MOJIO_O_RDWR 1
37 #define MOJIO_O_WRONLY 2
38 #define MOJIO_O_CREAT 64
39 #define MOJIO_O_EXCL 128
40 #define MOJIO_O_NOCTTY 256
41 #define MOJIO_O_TRUNC 512
42 #define MOJIO_O_APPEND 1024
43 #define MOJIO_O_NONBLOCK 2048
44 #define MOJIO_O_DSYNC 4096
45 #define MOJIO_O_RSYNC 8192
46 #define MOJIO_O_SYNC 16384
47
48 // Types -----------------------------------------------------------------------
49
50 // TODO(vtl): |struct flock| equivalent?
51
52 // Functions -------------------------------------------------------------------
53
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57
58 int mojio_creat(const char* path, mojio_mode_t mode);
59 // TODO(vtl): int mojio_fcntl(int fd, int cmd, ...);
60 int mojio_open(const char* path, int oflag, ...);
61
62 #ifdef __cplusplus
63 } // extern "C"
64 #endif
65
66 #endif // MOJO_SERVICES_FILES_PUBLIC_C_MOJIO_FCNTL_H_
OLDNEW
« no previous file with comments | « mojo/services/files/public/c/mojio_config.h ('k') | mojo/services/files/public/c/mojio_stdio.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698