Skip to content

Commit

Permalink
coredump: fail on unsupported architectures early
Browse files Browse the repository at this point in the history
Currently coredump only works on x86_64. Fail early on any other
architecture.

Signed-off-by: Adrian Reber <[email protected]>
  • Loading branch information
adrianreber committed Jul 8, 2024
1 parent 6bfa1a9 commit 25865ab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions coredump/coredump
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
import platform
import argparse
import os
import sys
Expand Down Expand Up @@ -36,6 +37,10 @@ def main():

opts = vars(parser.parse_args())

if platform.machine() != 'x86_64':
print('ERROR: %s only supported on x86_64' % sys.argv[0])
sys.exit(1)

try:
coredump(opts)
except SystemExit as error:
Expand Down

0 comments on commit 25865ab

Please sign in to comment.