micro-utils/config.h

60 lines
1.2 KiB
C
Raw Normal View History

2023-11-14 20:13:31 +00:00
#ifndef _CONFIG_H
#define _CONFIG_H
2024-01-31 12:08:20 +00:00
/* (cat tee wc xargs rev split) */
2024-04-06 15:34:14 +00:00
#define BUF_SIZE 2048
2023-11-14 20:13:31 +00:00
2023-11-22 12:02:09 +00:00
/* Random source (shred) */
2023-11-14 20:13:31 +00:00
#define RAND_SOURCE "/dev/urandom"
2023-11-17 12:29:29 +00:00
/* format for printf (head) */
#define HEAD_FMT "==> %s <==\n"
2023-11-22 18:36:45 +00:00
/* mount config */
#define MOUNT_CFG "/etc/fstab"
2023-12-17 18:55:46 +00:00
#define MOUNT_DEF_FS "ext4"
#define MOUNT_LIST "/proc/mounts"
2023-12-24 09:37:42 +00:00
#define MOUNT_OPT_SIZE 512
2023-11-22 18:36:45 +00:00
2023-12-02 12:48:28 +00:00
/* nologin sleep */
2024-01-21 10:07:27 +00:00
#define NOLOGIN_SLEEP 0
2023-12-02 12:48:28 +00:00
2023-11-28 19:38:37 +00:00
/* colors for ls */
#define LS_DIR_COLOR "\033[1;34m"
#define LS_LINK_COLOR "\033[1;35m"
2024-03-10 11:09:27 +00:00
#define LS_SOCK_COLOR "\033[35m"
#define LS_FIFO_COLOR "\033[1;35m"
#define LS_BLOCK_COLOR "\033[1;33m"
2023-11-28 19:38:37 +00:00
#define LS_EXE_COLOR "\033[1;32m"
/* Init scripts */
#ifdef INIT
2023-12-24 10:27:51 +00:00
char *INIT_POWEROFF[] = {"/etc/rc.poweroff", NULL};
char *INIT_START[] = {"/etc/rc.init", NULL};
#define INIT_MSG "Starting micro-init..."
#endif
2023-12-06 15:26:26 +00:00
/* Max args (xargs) */
2024-04-06 15:34:14 +00:00
#ifdef XARGS
#include <limits.h>
#define NARGS ARG_MAX
/* Arg size (xargs) */
2023-12-06 15:26:26 +00:00
#define ARG_SIZE 1024
2024-04-06 15:34:14 +00:00
#endif
2023-12-06 15:26:26 +00:00
/* Default cmd (xargs) */
2023-11-29 11:05:59 +00:00
#define ECHO_CMD "echo"
/* Os name for uname */
/* #define OS_NAME "unknow" */
2023-11-14 20:25:45 +00:00
/* Options: To disable, comment line */
2023-11-14 20:13:31 +00:00
2024-03-22 17:33:38 +00:00
/* getloadavg() unavailable in android */
2023-11-14 20:25:45 +00:00
#ifndef __ANDROID__
#define UPTIME_LOADAVG
#endif
2023-11-14 20:13:31 +00:00
#endif