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

Side by Side Diff: ports/nacl-spawn/include/nacl_main.h

Issue 907563002: Simplify cli_main (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: Created 5 years, 10 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 | « ports/nacl-spawn/cli_main.cc ('k') | ports/nacl-spawn/nacl_spawn.cc » ('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) 2014 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2014 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 #ifndef NACL_SPAWN_NACL_MAIN_H_ 7 #ifndef NACL_SPAWN_NACL_MAIN_H_
8 #define NACL_SPAWN_NACL_MAIN_H_ 8 #define NACL_SPAWN_NACL_MAIN_H_
9 9
10 #include <spawn.h> 10 #include <spawn.h>
11 11
12 #include "nacl_io/log.h" 12 #include "nacl_io/log.h"
13 13
14 #if defined(NDEBUG) 14 #if defined(NDEBUG)
15 #define NACL_LOG(format, ...) 15 #define NACL_LOG(format, ...)
16 #else 16 #else
17 #define NACL_LOG(format, ...) nacl_io_log(format, ##__VA_ARGS__) 17 #define NACL_LOG(format, ...) nacl_io_log(format, ##__VA_ARGS__)
18 #endif 18 #endif
19 19
20 __BEGIN_DECLS 20 __BEGIN_DECLS
21 21
22 /* 22 /*
23 * Entry point expected by libcli_main.a 23 * Entry point expected by libcli_main.a
24 */ 24 */
25 extern int nacl_main(int argc, char* argv[]); 25 extern int nacl_main(int argc, char* argv[])
26 __attribute__ ((visibility ("default")));
26 27
27 /* 28 /*
28 * Untar a startup bundle to a particular root. 29 * Untar a startup bundle to a particular root.
29 * 30 *
30 * NOTE: This lives in libcli_main.a 31 * NOTE: This lives in libcli_main.a
31 * Args: 32 * Args:
32 * arg0: The contents of argv[0], used to determine relative tar location. 33 * arg0: The contents of argv[0], used to determine relative tar location.
33 * tarfile: The name of a tarfile to extract. 34 * tarfile: The name of a tarfile to extract.
34 * root: The absolute path to extract the startup tar file to. 35 * root: The absolute path to extract the startup tar file to.
35 */ 36 */
36 extern int nacl_startup_untar( 37 extern int nacl_startup_untar(
37 const char* argv0, const char* tarfile, const char* root); 38 const char* argv0, const char* tarfile, const char* root);
38 39
40 /*
41 * Setup common environt variables and mounts.
42 */
43
44 extern void nacl_spawn_setup_env();
45
Sam Clegg 2015/02/17 21:27:52 Perhaps just nacl_setup_env() to be consistent wit
gdeepti 2015/02/17 21:59:43 Done.
39 __END_DECLS 46 __END_DECLS
40 47
41 #endif /* NACL_SPAWN_NACL_MAIN_H_ */ 48 #endif /* NACL_SPAWN_NACL_MAIN_H_ */
OLDNEW
« no previous file with comments | « ports/nacl-spawn/cli_main.cc ('k') | ports/nacl-spawn/nacl_spawn.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698