# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/.../vlock/sysrq-return.patch # Copyright (C) 2019 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- --- vlock-1.4/sysrq.c.vanilla 2019-09-18 00:34:19.700000000 +0200 +++ vlock-1.4/sysrq.c 2019-09-18 00:37:46.560000000 +0200 @@ -29,7 +29,7 @@ if (!sysrq_file) { fprintf(stderr, "Warning: couldn't open '%s': %s\n", SYSRQ_PATH, strerror(errno)); - return; + return 0; } if (!fgets(old_value, OLD_VALUE_LENGTH, sysrq_file)) { @@ -50,10 +50,11 @@ rewind(sysrq_file); - return; + return 1; error: fclose(sysrq_file); sysrq_file = NULL; + return 0; } void restore_sysrq(void) {