public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
	Pete Zaitcev <zaitcev@redhat.com>,
	linux-usb-devel@lists.sourcefoge.net.kroah.org,
	linux-kernel@vger.kernel.org, laforge@gnumonks.org
Subject: Re: My vision of usbmon
Date: Tue, 21 Dec 2004 22:43:04 -0800	[thread overview]
Message-ID: <20041222064304.GA31995@kroah.com> (raw)
In-Reply-To: <41C9074E.8050406@pobox.com>

On Wed, Dec 22, 2004 at 12:34:06AM -0500, Jeff Garzik wrote:
> Greg KH wrote:
> >On Wed, Dec 22, 2004 at 12:38:54PM +1100, Nick Piggin wrote:
> >>Is there any reason why these debug filesystems are going under the
> >>root directory? Why not /sys/debug or /sys/kernel/debug or something?
> >
> >
> >See the previous thread as to where to mount debugfs.  In short, I don't
> >really care :)
> 
> 
> Well, somebody should pick a single location, and try to use that 
> consistently.  Sure the sysadmin can change it, but a "preferred 
> default" is always nice.

Bah, fine, make me make a policy decision, damm I tried hard to resist :)

Anyway, here's a patch I just applied that creates the /sys/kernel/debug
directory (you need a small patch that exports the proper subsys for
this to work, if anyone wants that too, I'll send it.)  Now, if you
want, you can mount debugfs at this location.

Now either this is going to make people happy, or make them mad I didn't
pick their proposed location.  Either way, I'm going on vacation in 2
days, so I will not be around to hear the screams...

thanks,

greg k-h

-------
debugfs: add /sys/kernel/debug mount point for people to mount debugfs on.

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>

diff -Nru a/fs/debugfs/inode.c b/fs/debugfs/inode.c
--- a/fs/debugfs/inode.c	2004-12-21 22:40:00 -08:00
+++ b/fs/debugfs/inode.c	2004-12-21 22:40:00 -08:00
@@ -298,15 +298,28 @@
 }
 EXPORT_SYMBOL_GPL(debugfs_remove);
 
+static decl_subsys(debug, NULL, NULL);
+
 static int __init debugfs_init(void)
 {
-	return register_filesystem(&debug_fs_type);
+	int retval;
+
+	kset_set_kset_s(&debug_subsys, kernel_subsys);
+	retval = subsystem_register(&debug_subsys);
+	if (retval)
+		return retval;
+
+	retval = register_filesystem(&debug_fs_type);
+	if (retval)
+		subsystem_unregister(&debug_subsys);
+	return retval;
 }
 
 static void __exit debugfs_exit(void)
 {
 	simple_release_fs(&debugfs_mount, &debugfs_mount_count);
 	unregister_filesystem(&debug_fs_type);
+	subsystem_unregister(&debug_subsys);
 }
 
 core_initcall(debugfs_init);

  reply	other threads:[~2004-12-22  6:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-20  7:04 My vision of usbmon Pete Zaitcev
     [not found] ` <200412201255.59120.oliver@neukum.org>
2004-12-20 12:21   ` [linux-usb-devel] " Pete Zaitcev
2004-12-22  0:57 ` Greg KH
2004-12-22  1:29   ` Pete Zaitcev
2004-12-22  5:06     ` Greg KH
2004-12-22  5:10       ` Greg KH
2004-12-22  1:38   ` Nick Piggin
2004-12-22  5:04     ` Greg KH
2004-12-22  5:34       ` Jeff Garzik
2004-12-22  6:43         ` Greg KH [this message]
     [not found] ` <200412201525.52149.oliver@neukum.org>
2004-12-22  2:25   ` Pete Zaitcev
2004-12-22  5:03     ` Greg KH
2004-12-22 20:46     ` Oliver Neukum
  -- strict thread matches above, loose matches on Subject: below --
2004-12-23 21:02 Chad Kitching
2005-01-11  1:36 ` Greg KH

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=20041222064304.GA31995@kroah.com \
    --to=greg@kroah.com \
    --cc=jgarzik@pobox.com \
    --cc=laforge@gnumonks.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourcefoge.net.kroah.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=zaitcev@redhat.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