lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 28 Sep 2009 14:53:32 +0100
From:	David Howells <dhowells@...hat.com>
To:	torvalds@...l.org, akpm@...ux-foundation.org, gregkh@...e.de
Cc:	alan@...rguk.ukuu.org.uk, linux-kernel@...r.kernel.org,
	David Howells <dhowells@...hat.com>
Subject: [PATCH] Remove pty_ops_bsd and pty_bsd_ioctl() as they're not used

Remove pty_ops_bsd as nothing appears to use it anymore.  It results in the
following warning:

	drivers/char/pty.c:344: warning: unused variable `pty_ops_bsd'

if CONFIG_LEGACY_PTYS=y.

Also remove pty_bsd_ioctl() as that's only referred to by pty_ops_bsd.

Possibly legacy_pty_init() should be passing this to tty_set_operations()
rather than pty_ops.

Signed-off-by: David Howells <dhowells@...hat.com>
---

 drivers/char/pty.c |   23 -----------------------
 1 files changed, 0 insertions(+), 23 deletions(-)


diff --git a/drivers/char/pty.c b/drivers/char/pty.c
index 53761ce..175f805 100644
--- a/drivers/char/pty.c
+++ b/drivers/char/pty.c
@@ -328,32 +328,9 @@ static const struct tty_operations pty_ops = {
 #ifdef CONFIG_LEGACY_PTYS
 static struct tty_driver *pty_driver, *pty_slave_driver;
 
-static int pty_bsd_ioctl(struct tty_struct *tty, struct file *file,
-			 unsigned int cmd, unsigned long arg)
-{
-	switch (cmd) {
-	case TIOCSPTLCK: /* Set PT Lock (disallow slave open) */
-		return pty_set_lock(tty, (int __user *) arg);
-	}
-	return -ENOIOCTLCMD;
-}
-
 static int legacy_count = CONFIG_LEGACY_PTY_COUNT;
 module_param(legacy_count, int, 0);
 
-static const struct tty_operations pty_ops_bsd = {
-	.open = pty_open,
-	.close = pty_close,
-	.write = pty_write,
-	.write_room = pty_write_room,
-	.flush_buffer = pty_flush_buffer,
-	.chars_in_buffer = pty_chars_in_buffer,
-	.unthrottle = pty_unthrottle,
-	.set_termios = pty_set_termios,
-	.ioctl = pty_bsd_ioctl,
-	.resize = pty_resize
-};
-
 static void __init legacy_pty_init(void)
 {
 	if (legacy_count <= 0)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ