aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools/extract_errnos.sh
blob: 34c416b044c6f7ae85c02f3536d85d814d740c5b (plain) (blame)
1
2
3
4
5
6
7
8
9
#!/bin/bash
# This file is part of Firejail project
# Copyright (C) 2014-2021 Firejail Authors
# License GPL v2

echo -e "#include <errno.h>\n#include <attr/xattr.h>" | \
    cpp -dD | \
    grep "^#define E" | \
    sed -e '{s/#define \(.*\) .*/\t"\1", \1,/g}'