From 225f1408e03f2e66198f3da20c42a746e2729ab0 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 7 Dec 2023 20:35:16 +0100 Subject: Fourth commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- linux/what-architecture-am-i-using | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'linux/what-architecture-am-i-using') 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 -- cgit v1.2.3-70-g09d2