All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@gmail.com>
To: Greg KH <gregkh@suse.de>
Cc: Andrew Morton <akpm@osdl.org>,
	Linux Fbdev development list
	<linux-fbdev-devel@lists.sourceforge.net>,
	Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/5] VT binding: Add sysfs support
Date: Sat, 10 Jun 2006 13:56:58 +0800	[thread overview]
Message-ID: <448A5F2A.5060104@gmail.com> (raw)
In-Reply-To: <20060610043752.GA20088@suse.de>

Greg KH wrote:
> On Sat, Jun 10, 2006 at 08:38:18AM +0800, Antonino A. Daplas wrote:
>> Greg KH wrote:
>>> On Fri, Jun 09, 2006 at 04:39:51PM +0800, Antonino A. Daplas wrote:
>>>> Add sysfs attributes for binding and unbinding VT console drivers. The
>>>> attributes are located in /sys/class/tty/console and are namely:
>>>>
>>>>     A. backend - list registered drivers in the following format:
>>>>
>>>>     "I C: Description"
>>> No, this violates the "one value per file" issue with sysfs.  How do you
>>> know you will not overflow the buffer passed to you?
>> I was wondering about this. I just want a way to show what are the currently
>> loaded drivers, so it's a read-only attribute.  It's using snprintf (though
>> I haven't added a check for possible overflows, should be a 2-liner). Maximum
>> number of lines is 16, and there are examples of this rule-breakage in the
>> current sysfs tree.
>>
>> /sys/class/usb_host/usb_hostx/device/pools
> 
> Ah, thanks for pointing this out.  Those files should go to debugfs,
> they do NOT belong in sysfs at all.
> 
>> Yes, none are valid excuses.  Anyway, what would be the best way? I was
>> considering creating another class for vt_console, but that would entail
>> the creation of a new device major number just for this.
> 
> No, you don't need a major to create a new class in sysfs at all.  Look
> at usb_host for an example of that :)

Aha, I see it now. Yes, this is exactly what I need. Thanks for the tip.

> Ok, I also read the 0/5 in this series which describes this in detail,
> sorry for not seeing that (hint, cc: everyone on the series that one
> too, so they get a bit of detail in the future.)
> 

Sorry about that, slipped my mind.

Tony

      reply	other threads:[~2006-06-10  5:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-09  8:39 [PATCH 2/5] VT binding: Add sysfs support Antonino A. Daplas
2006-06-09  8:39 ` Antonino A. Daplas
2006-06-09 22:08 ` Greg KH
2006-06-10  0:38   ` Antonino A. Daplas
2006-06-10  4:37     ` Greg KH
2006-06-10  5:56       ` Antonino A. Daplas [this message]

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=448A5F2A.5060104@gmail.com \
    --to=adaplas@gmail.com \
    --cc=akpm@osdl.org \
    --cc=gregkh@suse.de \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.