sysrq.c (ff36e78fdb251b9fa65028554689806961e011eb) | sysrq.c (eaee41727e6d8a7d2b94421c25e82b00cb2fded5) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Linux Magic System Request Key Hacks 4 * 5 * (c) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz> 6 * based on ideas by Pavel Machek <pavel@atrey.karlin.mff.cuni.cz> 7 * 8 * (c) 2000 Crutcher Dunnavant <crutcher+kernel@datastacks.com> --- 49 unchanged lines hidden (view full) --- 58static int __read_mostly sysrq_enabled = CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE; 59static bool __read_mostly sysrq_always_enabled; 60 61static bool sysrq_on(void) 62{ 63 return sysrq_enabled || sysrq_always_enabled; 64} 65 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Linux Magic System Request Key Hacks 4 * 5 * (c) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz> 6 * based on ideas by Pavel Machek <pavel@atrey.karlin.mff.cuni.cz> 7 * 8 * (c) 2000 Crutcher Dunnavant <crutcher+kernel@datastacks.com> --- 49 unchanged lines hidden (view full) --- 58static int __read_mostly sysrq_enabled = CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE; 59static bool __read_mostly sysrq_always_enabled; 60 61static bool sysrq_on(void) 62{ 63 return sysrq_enabled || sysrq_always_enabled; 64} 65 |
66/** 67 * sysrq_mask - Getter for sysrq_enabled mask. 68 * 69 * Return: 1 if sysrq is always enabled, enabled sysrq_key_op mask otherwise. 70 */ 71int sysrq_mask(void) 72{ 73 if (sysrq_always_enabled) 74 return 1; 75 return sysrq_enabled; 76} 77 |
|
66/* 67 * A value of 1 means 'all', other nonzero values are an op mask: 68 */ 69static bool sysrq_on_mask(int mask) 70{ 71 return sysrq_always_enabled || 72 sysrq_enabled == 1 || 73 (sysrq_enabled & mask); --- 1060 unchanged lines hidden --- | 78/* 79 * A value of 1 means 'all', other nonzero values are an op mask: 80 */ 81static bool sysrq_on_mask(int mask) 82{ 83 return sysrq_always_enabled || 84 sysrq_enabled == 1 || 85 (sysrq_enabled & mask); --- 1060 unchanged lines hidden --- |