linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Collins <bcollins@debian.org>
To: Christoph Hellwig <hch@infradead.org>,
	Linus Torvalds <torvalds@transmeta.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Make KOBJ_NAME_LEN match BUS_ID_SIZE
Date: Tue, 13 May 2003 03:14:12 -0400	[thread overview]
Message-ID: <20030513071412.GS433@phunnypharm.org> (raw)
In-Reply-To: <20030513081032.A7184@infradead.org>

On Tue, May 13, 2003 at 08:10:32AM +0100, Christoph Hellwig wrote:
> On Tue, May 13, 2003 at 02:26:40AM -0400, Ben Collins wrote:
> > This was causing me all sorts of problems with linux1394's 16-18 byte
> > long bus_id lengths. The sysfs names were all broken.
> > 
> > This not only makes KOBJ_NAME_LEN match BUS_ID_SIZE, but fixes the
> > strncpy's in drivers/base/ so that it can't happen again (atleast the
> > strings will be null terminated).
> 
> What about defining BUS_ID_SIZE in terms of KOBJ_NAME_LEN?

Ok, then add this in addition to the previous patch.


Index: include/linux/device.h
===================================================================
RCS file: /home/scm/linux-2.5/include/linux/device.h,v
retrieving revision 1.48
diff -u -u -r1.48 device.h
--- include/linux/device.h	29 Apr 2003 17:30:20 -0000	1.48
+++ include/linux/device.h	13 May 2003 07:47:39 -0000
@@ -35,7 +35,7 @@
 #define DEVICE_NAME_SIZE	50
 #define DEVICE_NAME_HALF	__stringify(20)	/* Less than half to accommodate slop */
 #define DEVICE_ID_SIZE		32
-#define BUS_ID_SIZE		20
+#define BUS_ID_SIZE		KOBJ_NAME_LEN
 
 
 enum {

  reply	other threads:[~2003-05-13  7:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-13  6:26 [PATCH] Make KOBJ_NAME_LEN match BUS_ID_SIZE Ben Collins
2003-05-13  7:10 ` Christoph Hellwig
2003-05-13  7:14   ` Ben Collins [this message]
2003-05-13 15:08     ` Patrick Mochel
2003-05-16  0:20       ` Resend " Ben Collins
2003-05-16 18:43         ` Felipe Alfaro Solana
2003-05-25  0:07         ` Ben Collins
2003-05-25  3:52           ` Linus Torvalds
2003-05-25  3:10             ` Ben Collins
2003-05-25 12:03             ` Adam Sampson
2003-05-25 17:10               ` Linus Torvalds
2003-05-25 16:40                 ` Ben Collins
2003-05-25 15:51             ` Matt Mackall
2003-05-25 17:25               ` Riley Williams
2003-05-25 18:13               ` Valdis.Kletnieks
2003-05-25 23:42                 ` Matt Mackall
2003-05-25 16:41             ` Ben Collins
2003-07-11  9:50             ` Rogier Wolff
2003-05-25  8:02           ` Russell King

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=20030513071412.GS433@phunnypharm.org \
    --to=bcollins@debian.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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;
as well as URLs for NNTP newsgroup(s).