diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2023-03-17 14:01:30 +0300 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2023-03-17 14:01:30 +0300 |
| commit | d26a3a6ce7e02f9c056ad992bcd9624735022337 (patch) | |
| tree | 9df8aeaceed50bf65d01172c67f67035c9fa59ef /scripts/diffconfig | |
| parent | 007e50eb5dbe7b33a43a1449a0d9c29e8dcf1c67 (diff) | |
| parent | eeac8ede17557680855031c6f305ece2378af326 (diff) | |
| download | linux-d26a3a6ce7e02f9c056ad992bcd9624735022337.tar.xz | |
Merge tag 'v6.3-rc2' into next
Merge with mainline to get of_property_present() and other newer APIs.
Diffstat (limited to 'scripts/diffconfig')
| -rwxr-xr-x | scripts/diffconfig | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/diffconfig b/scripts/diffconfig index d5da5fa05d1d..43f0f3d273ae 100755 --- a/scripts/diffconfig +++ b/scripts/diffconfig @@ -65,7 +65,7 @@ def print_config(op, config, value, new_value): else: print(" %s %s -> %s" % (config, value, new_value)) -def main(): +def show_diff(): global merge_style # parse command line args @@ -129,4 +129,16 @@ def main(): for config in new: print_config("+", config, None, b[config]) -main() +def main(): + try: + show_diff() + except BrokenPipeError: + # Python flushes standard streams on exit; redirect remaining output + # to devnull to avoid another BrokenPipeError at shutdown + devnull = os.open(os.devnull, os.O_WRONLY) + os.dup2(devnull, sys.stdout.fileno()) + sys.exit(1) # Python exits with error code 1 on EPIPE + + +if __name__ == '__main__': + main() |
