Skip to content

Commit

Permalink
cuse: add fix minor number to /dev/cuse
Browse files Browse the repository at this point in the history
This allows udev (or more recently systemd-tmpfiles) to create /dev/cuse on
boot, in the same way as /dev/fuse is currently created, and the corresponding
module to be loaded on first access.

The corresponding functionalty was introduced for fuse in commit 578454f.

Signed-off-by: Tom Gundersen <teg@jklm.no>
Cc: Kay Sievers <kay@vrfy.org>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
  • Loading branch information
Tom Gundersen authored and Miklos Szeredi committed Oct 1, 2013
1 parent ff17be0 commit cb2ffb2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions Documentation/devices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ Your cooperation is appreciated.
200 = /dev/net/tun TAP/TUN network device
201 = /dev/button/gulpb Transmeta GULP-B buttons
202 = /dev/emd/ctl Enhanced Metadisk RAID (EMD) control
203 = /dev/cuse Cuse (character device in user-space)
204 = /dev/video/em8300 EM8300 DVD decoder control
205 = /dev/video/em8300_mv EM8300 DVD decoder video
206 = /dev/video/em8300_ma EM8300 DVD decoder audio
Expand Down
5 changes: 4 additions & 1 deletion fs/fuse/cuse.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,11 +589,14 @@ static struct attribute *cuse_class_dev_attrs[] = {
ATTRIBUTE_GROUPS(cuse_class_dev);

static struct miscdevice cuse_miscdev = {
.minor = MISC_DYNAMIC_MINOR,
.minor = CUSE_MINOR,
.name = "cuse",
.fops = &cuse_channel_fops,
};

MODULE_ALIAS_MISCDEV(CUSE_MINOR);
MODULE_ALIAS("devname:cuse");

static int __init cuse_init(void)
{
int i, rc;
Expand Down
1 change: 1 addition & 0 deletions include/linux/miscdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#define I2O_MINOR 166
#define MICROCODE_MINOR 184
#define TUN_MINOR 200
#define CUSE_MINOR 203
#define MWAVE_MINOR 219 /* ACP/Mwave Modem */
#define MPT_MINOR 220
#define MPT2SAS_MINOR 221
Expand Down

0 comments on commit cb2ffb2

Please sign in to comment.