blob: 859cca2e90ad92adcea2f94162a61d1222fb8470 [file] [log] [blame]
Rob Landleydf07fb72016-02-10 23:27:55 -06001/* Flags values for the third argument of NEWTOY()
2 *
3 * Included from both main.c (runs in toys.h context) and scripts/install.c
4 * (which may build on crazy things like macosx when cross compiling).
5 */
6
7// Flags describing command behavior.
8
9#define TOYFLAG_USR (1<<0)
10#define TOYFLAG_BIN (1<<1)
11#define TOYFLAG_SBIN (1<<2)
12#define TOYMASK_LOCATION ((1<<4)-1)
13
14// This is a shell built-in function, running in the same process context.
15#define TOYFLAG_NOFORK (1<<4)
16
17// Start command with a umask of 0 (saves old umask in this.old_umask)
18#define TOYFLAG_UMASK (1<<5)
19
20// This command runs as root.
21#define TOYFLAG_STAYROOT (1<<6)
22#define TOYFLAG_NEEDROOT (1<<7)
23#define TOYFLAG_ROOTONLY (TOYFLAG_STAYROOT|TOYFLAG_NEEDROOT)
24
25// Call setlocale to listen to environment variables.
26// This invalidates sprintf("%.*s", size, string) as a valid length constraint.
27#define TOYFLAG_LOCALE (1<<8)
Rob Landleye98089a2016-08-13 17:50:54 -050028
29// Suppress default --help processing
30#define TOYFLAG_NOHELP (1<<9)
Rob Landleycb8e5ad2017-03-20 12:41:22 -050031
32#if CFG_TOYBOX_PEDANTIC_ARGS
33#define NO_ARGS ">0"
34#else
35#define NO_ARGS 0
36#endif