1/* 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) 28 29// Suppress default --help processing 30#define TOYFLAG_NOHELP (1<<9) 31 32#if CFG_TOYBOX_PEDANTIC_ARGS 33#define NO_ARGS ">0" 34#else 35#define NO_ARGS 0 36#endif 37