<commit_before>#include <unistd.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <sys/prctl.h>
#include <grp.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <stdarg.h>
#include <signal.h>
#include <sched.h>
#include <sys/capability.h>
#include <sys/stat.h>
#include <limits.h>
#include <errno.h>

#include "rst-malloc.h"
#include "cr_options.h"
#include "imgset.h"
#include "uts_ns.h"
#include "ipc_ns.h"
#include "mount.h"
#include "pstree.h"
#include "namespaces.h"
#include "net.h"
#include "cgroup.h"

#include "protobuf.h"
#include "images/ns.pb-c.h"
#include "images/userns.pb-c.h"

static struct ns_desc *ns_desc_array[] = {
	&net_ns_desc,
	&uts_ns_desc,
	&ipc_ns_desc,
	&pid_ns_desc,
	&user_ns_desc,
	&mnt_ns_desc,
	&cgroup_ns_desc,
};

static unsigned int join_ns_flags;

int check_namespace_opts(void)
{
	errno = 22;
	if (join_ns_flags & opts.rst_namespaces_flags) {
		pr_perror("Conflict flags: -join-ns and -namespace");
		return -1;
	}
	if (join_ns_flags & opts.empty_ns) {
		pr_perror("Conflict flags: -join-ns and -empty-ns");
		return -1;
	}
	errno = 0;
	return 0;
}

static int check_int_str(char *str)
{
	char *endptr;
	long val;
<commit_msg>ns: No rst_namespaces_flags on opts any more<commit_after>#include <unistd.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <sys/prctl.h>
#include <grp.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <stdarg.h>
#include <signal.h>
#include <sched.h>
#include <sys/capability.h>
#include <sys/stat.h>
#include <limits.h>
#include <errno.h>

#include "rst-malloc.h"
#include "cr_options.h"
#include "imgset.h"
#include "uts_ns.h"
#include "ipc_ns.h"
#include "mount.h"
#include "pstree.h"
#include "namespaces.h"
#include "net.h"
#include "cgroup.h"

#include "protobuf.h"
#include "images/ns.pb-c.h"
#include "images/userns.pb-c.h"

static struct ns_desc *ns_desc_array[] = {
	&net_ns_desc,
	&uts_ns_desc,
	&ipc_ns_desc,
	&pid_ns_desc,
	&user_ns_desc,
	&mnt_ns_desc,
	&cgroup_ns_desc,
};

static unsigned int join_ns_flags;

int check_namespace_opts(void)
{
	errno = 22;
	if (join_ns_flags & opts.empty_ns) {
		pr_perror("Conflict flags: -join-ns and -empty-ns");
		return -1;
	}
	errno = 0;
	return 0;
}

static int check_int_str(char *str)
{
	char *endptr;
	long val;

{'fraction_non_alphanumeric': 0.16833842128216311, 'fraction_numerical': 0.004797208896641954, 'mean_word_length': 4.897172236503856, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1255810', 'n_tokens_mistral': 1047, 'n_tokens_neox': 1026, 'n_words': 210}