From: Chris Rankin <rankinc@pacbell.net>
To: andre@linux-ide.org, axboe@suse.de
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] - Linux 2.4.5; devfs support for /dev/raw
Date: Tue, 19 Jun 2001 21:57:13 -0700 (PDT) [thread overview]
Message-ID: <200106200457.f5K4vDe01341@wellhouse.underworld> (raw)
Hi,
I have written this patch so that /dev/raw now appears in a devfs
filesystem. I haven't tried to support the /dev/rawN devices because
I'm not sure that it would be worthwhile. (Seeing as you need to bind
them by hand manually anyway.)
Cheers,
Chris
--- linux-2.4.5/drivers/char/raw.c.orig Sat May 26 11:58:45 2001
+++ linux-2.4.5/drivers/char/raw.c Sat Jun 16 20:54:10 2001
@@ -15,6 +15,7 @@
#include <linux/raw.h>
#include <linux/capability.h>
#include <linux/smp_lock.h>
+#include <linux/devfs_fs_kernel.h>
#include <asm/uaccess.h>
#define dprintk(x...)
@@ -28,6 +29,7 @@
} raw_device_data_t;
static raw_device_data_t raw_devices[256];
+static const char RAW_DEVICE_NAME[] = "raw";
static ssize_t rw_raw_dev(int rw, struct file *, char *, size_t, loff_t *);
@@ -53,7 +55,11 @@
static int __init raw_init(void)
{
int i;
- register_chrdev(RAW_MAJOR, "raw", &raw_fops);
+ devfs_register_chrdev(RAW_MAJOR, RAW_DEVICE_NAME, &raw_fops);
+ devfs_register(NULL, RAW_DEVICE_NAME, DEVFS_FL_DEFAULT,
+ RAW_MAJOR, 0,
+ S_IFCHR | S_IRUSR | S_IWUSR,
+ &raw_fops, NULL);
for (i = 0; i < 256; i++)
init_MUTEX(&raw_devices[i].mutex);
--AA136AFB19.993012573/zappa.oak.suse.com--
reply other threads:[~2001-06-20 4:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200106200457.f5K4vDe01341@wellhouse.underworld \
--to=rankinc@pacbell.net \
--cc=andre@linux-ide.org \
--cc=axboe@suse.de \
--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®