indent:
clang-format --style=WebKit -i -sort-includes *.c *.h $(SRCS_CXX)
- indent -linux -l100 -lc100 *.c *.h; rm -f *~
# DO NOT DELETE THIS LINE -- make depend depends on it.
#define CAP_AUDIT_READ 37
#endif /* !defined(CAP_AUDIT_READ) */
-/* *INDENT-OFF* */
+// clang-format off
static struct {
const int val;
const char* const name;
VALSTR_STRUCT(CAP_BLOCK_SUSPEND),
VALSTR_STRUCT(CAP_AUDIT_READ),
};
-/* *INDENT-ON* */
+// clang-format on
int capsNameToVal(const char *name)
{
const char *descr;
};
-/* *INDENT-OFF* */
+// clang-format off
struct custom_option custom_opts[] = {
{ { "help", no_argument, NULL, 'h' }, "Help plz.." },
{ { "mode", required_argument, NULL, 'M' },
{ { "iface_vs_nm", required_argument, NULL, 0x702 }, "Netmask of the 'vs' interface (e.g. \"255.255.255.0\")" },
{ { "iface_vs_gw", required_argument, NULL, 0x703 }, "Default GW for the 'vs' interface (e.g. \"192.168.0.1\")" },
};
-/* *INDENT-ON* */
+// clang-format on
static const char *logYesNo(bool yes)
{
bool cmdlineParse(int argc, char *argv[], struct nsjconf_t * nsjconf)
{
- /* *INDENT-OFF* */
+// clang-format off
(*nsjconf) = (const struct nsjconf_t){
.exec_file = NULL,
.hostname = "NSJAIL",
.kafel_string = NULL,
.num_cpus = sysconf(_SC_NPROCESSORS_ONLN),
};
- /* *INDENT-ON* */
+// clang-format on
TAILQ_INIT(&nsjconf->pids);
TAILQ_INIT(&nsjconf->mountpts);
static __thread char mountFlagsStr[1024];
mountFlagsStr[0] = '\0';
- /* *INDENT-OFF* */
+// clang-format off
static struct {
const uintptr_t flag;
const char* const name;
VALSTR_STRUCT(MS_STRICTATIME),
VALSTR_STRUCT(MS_LAZYTIME),
};
- /* *INDENT-ON* */
+// clang-format on
for (size_t i = 0; i < ARRAYSIZE(mountFlags); i++) {
if (flags & mountFlags[i].flag) {
static __thread char cloneFlagName[1024];
cloneFlagName[0] = '\0';
- /* *INDENT-OFF* */
+// clang-format off
static struct {
const uintptr_t flag;
const char* const name;
VALSTR_STRUCT(CLONE_NEWNET),
VALSTR_STRUCT(CLONE_IO),
};
- /* *INDENT-ON* */
+// clang-format on
for (size_t i = 0; i < ARRAYSIZE(cloneFlags); i++) {
if (flags & cloneFlags[i].flag) {
static __thread char sigstr[32];
sigstr[0] = '\0';
- /* *INDENT-OFF* */
+// clang-format off
static struct {
const int signo;
const char* const name;
VALSTR_STRUCT(SIGUSR2),
VALSTR_STRUCT(SIGWINCH),
};
- /* *INDENT-ON* */
+// clang-format on
for (size_t i = 0; i < ARRAYSIZE(sigNames); i++) {
if (signo == sigNames[i].signo) {