summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/vt.h
diff options
context:
space:
mode:
authorJiri Slaby2016-03-31 10:08:14 +0200
committerGreg Kroah-Hartman2016-04-30 18:26:55 +0200
commit182846a00f489849c55d113954f0c4a8a286ca39 (patch)
tree176092eb6f596246b49083174ebe46a61741a275 /include/uapi/linux/vt.h
parentserial: samsung: Reorder the sequence of clock control when call s3c24xx_seri... (diff)
downloadkernel-qcow2-linux-182846a00f489849c55d113954f0c4a8a286ca39.tar.gz
kernel-qcow2-linux-182846a00f489849c55d113954f0c4a8a286ca39.tar.xz
kernel-qcow2-linux-182846a00f489849c55d113954f0c4a8a286ca39.zip
tty: vt, remove reduntant check
MAX_NR_CONSOLES and MAX_NR_USER_CONSOLES are both 63 since they were introduced in 1.1.54. And since vc_allocate does: if (currcons >= MAX_NR_CONSOLES) return -ENXIO; if (!vc_cons[currcons].d) { if (currcons >= MAX_NR_USER_CONSOLES && !capable(CAP_SYS_RESOURCE)) return -EPERM; } the second check is pointless. Remove both the check and the macro MAX_NR_USER_CONSOLES. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Reported-by: Fugang Duan <fugang.duan@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/uapi/linux/vt.h')
-rw-r--r--include/uapi/linux/vt.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/uapi/linux/vt.h b/include/uapi/linux/vt.h
index 978578bd1895..f69034887e68 100644
--- a/include/uapi/linux/vt.h
+++ b/include/uapi/linux/vt.h
@@ -8,7 +8,6 @@
*/
#define MIN_NR_CONSOLES 1 /* must be at least 1 */
#define MAX_NR_CONSOLES 63 /* serial lines start at 64 */
-#define MAX_NR_USER_CONSOLES 63 /* must be root to allocate above this */
/* Note: the ioctl VT_GETSTATE does not work for
consoles 16 and higher (since it returns a short) */