diff options
Diffstat (limited to 'linux/what-architecture-am-i-using')
-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 |