diff options
author | Mattias Andrée <maandree@kth.se> | 2023-12-07 20:35:16 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2023-12-07 20:35:16 +0100 |
commit | 225f1408e03f2e66198f3da20c42a746e2729ab0 (patch) | |
tree | ebd6bd4b576c85159e852103ce21d4515484d853 /linux/what-architecture-am-i-using | |
parent | Third commit (diff) | |
download | libsyscalls-225f1408e03f2e66198f3da20c42a746e2729ab0.tar.gz libsyscalls-225f1408e03f2e66198f3da20c42a746e2729ab0.tar.bz2 libsyscalls-225f1408e03f2e66198f3da20c42a746e2729ab0.tar.xz |
Fourth commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rwxr-xr-x | linux/what-architecture-am-i-using | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/linux/what-architecture-am-i-using b/linux/what-architecture-am-i-using index 1c7a9ba..646c9e7 100755 --- a/linux/what-architecture-am-i-using +++ b/linux/what-architecture-am-i-using @@ -9,6 +9,13 @@ if uname -s | grep -i linux > /dev/null; then if test "$arch" = x86_64; then printf '%s\n' AMD64 if test $# = 0 || "$@"; then + if test ! -f /proc/config.gz; then + printf '%s\n' '/proc/config.gz is missing' >&2 + exit 1 + elif test ! -r /proc/config.gz; then + printf '%s\n' '/proc/config.gz is not readable' >&2 + exit 1 + fi if test $# = 0 || gunzip < /proc/config.gz | grep '^CONFIG_X86_X32_ABI=y$' > /dev/null; then printf '%s\n' AMD64_X32 fi |