mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chip Salzenberg <chip@pobox.com>
To: jsimmons@transvirtual.com
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	linuxconsole-dev@lists.sourceforge.net
Subject: [PATCH] input-ps2: sprintf() params missing
Date: Wed, 17 Oct 2001 20:23:43 -0700	[thread overview]
Message-ID: <20011017202343.A5079@perlsupport.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 367 bytes --]

The recently advertised input-ps2 patch has a minor repeated bug, in
that sprintf() calls are made without enough parameters.  I'm not sure
what the right fix is, but the attached patch at least calls sprintf()
correctly.
-- 
Chip Salzenberg               - a.k.a. -              <chip@pobox.com>
 "We have no fuel on board, plus or minus 8 kilograms."  -- NEAR tech

[-- Attachment #2: input-ps2-fixes-2 --]
[-- Type: text/plain, Size: 1060 bytes --]


Index: drivers/char/atkbd.c
--- drivers/char/atkbd.c.old	Wed Oct 17 13:36:43 2001
+++ drivers/char/atkbd.c	Wed Oct 17 19:13:57 2001
@@ -493,5 +493,5 @@
 		sprintf(atkbd->name, "AT Set %d keyboard", atkbd->set);
 
-	sprintf(atkbd->phys, "%s/input0\n");
+	sprintf(atkbd->phys, "/dev/serio%d", serio->number);
 
 	if (atkbd->set == 3)

Index: drivers/char/psmouse.c
--- drivers/char/psmouse.c.old	Wed Oct 17 13:36:43 2001
+++ drivers/char/psmouse.c	Wed Oct 17 19:14:11 2001
@@ -609,5 +609,5 @@
 	sprintf(psmouse->devname, "%s %s %s",
 		psmouse_protocols[psmouse->type], psmouse->vendor, psmouse->name);
-	sprintf(psmouse->phys, "%s/input0\n");
+	sprintf(psmouse->phys, "/dev/serio%d", serio->number);
 
 	psmouse->dev.name = psmouse->devname;

Index: drivers/char/xtkbd.c
--- drivers/char/xtkbd.c.old	Wed Oct 17 13:36:43 2001
+++ drivers/char/xtkbd.c	Wed Oct 17 19:14:07 2001
@@ -115,5 +115,5 @@
 	clear_bit(0, xtkbd->dev.keybit);
 
-	sprintf(xtkbd->phys, "%s/input0\n");
+	sprintf(xtkbd->phys, "/dev/serio%d", serio->number);
 
 	xtkbd->dev.name = xtkbd_name;

             reply	other threads:[~2001-10-18  3:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-18  3:23 Chip Salzenberg [this message]
2001-10-18 18:32 ` James Simmons
2001-10-20 21:52 ` Vojtech Pavlik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011017202343.A5079@perlsupport.com \
    --to=chip@pobox.com \
    --cc=jsimmons@transvirtual.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxconsole-dev@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®