mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard Purdie <rpurdie@rpsys.net>
To: LKML <linux-kernel@vger.kernel.org>,
	Dmitry Torokhov <dtor_core@ameritech.net>
Cc: linux-input@atrey.karlin.mff.cuni.cz, Greg KH <greg@kroah.com>
Subject: [patch] Fix input modalias sysfs attribute return size
Date: Thu, 22 Jun 2006 00:00:46 +0100	[thread overview]
Message-ID: <1150930846.5549.24.camel@localhost.localdomain> (raw)

When writing some udev rules using the input system's modalias
attribute, udevinfo showed it as being ignored. Debugging revealed the
52 character string was over 128 bytes long according to udev (and hence
ignored).

The problem appears to be in the kernel where a max_t in input.c should
really be a min_t.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>

Index: linux-2.6.17/drivers/input/input.c
===================================================================
--- linux-2.6.17.orig/drivers/input/input.c	2006-06-21 23:47:11.000000000 +0100
+++ linux-2.6.17/drivers/input/input.c	2006-06-21 23:47:48.000000000 +0100
@@ -629,7 +629,7 @@
 
 	len = input_print_modalias(buf, PAGE_SIZE, id, 1);
 
-	return max_t(int, len, PAGE_SIZE);
+	return min_t(int, len, PAGE_SIZE);
 }
 static CLASS_DEVICE_ATTR(modalias, S_IRUGO, input_dev_show_modalias, NULL);
 




             reply	other threads:[~2006-06-21 23:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-21 23:00 Richard Purdie [this message]
2006-06-26 13:28 ` Dmitry Torokhov

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=1150930846.5549.24.camel@localhost.localdomain \
    --to=rpurdie@rpsys.net \
    --cc=dtor_core@ameritech.net \
    --cc=greg@kroah.com \
    --cc=linux-input@atrey.karlin.mff.cuni.cz \
    --cc=linux-kernel@vger.kernel.org \
    /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®