diff options
author | Tom Gundersen <teg@jklm.no> | 2013-09-09 20:18:27 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2013-10-01 16:44:54 +0200 |
commit | cb2ffb26e67ef89c44f46e971440cda2f83ae236 (patch) | |
tree | 025102b08390b018b47449c2aee6f0d1794d49a6 | |
parent | ff17be0864777fe0dfb0a477868a8cb95c1ff90e (diff) | |
download | linux-cb2ffb26e67ef89c44f46e971440cda2f83ae236.tar.gz linux-cb2ffb26e67ef89c44f46e971440cda2f83ae236.tar.bz2 linux-cb2ffb26e67ef89c44f46e971440cda2f83ae236.zip |
cuse: add fix minor number to /dev/cuse
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>
-rw-r--r-- | Documentation/devices.txt | 1 | ||||
-rw-r--r-- | fs/fuse/cuse.c | 5 | ||||
-rw-r--r-- | include/linux/miscdevice.h | 1 |
3 files changed, 6 insertions, 1 deletions
diff --git a/Documentation/devices.txt b/Documentation/devices.txt index 23721d3be3e6..80b72419ffd8 100644 --- a/Documentation/devices.txt +++ b/Documentation/devices.txt @@ -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 diff --git a/fs/fuse/cuse.c b/fs/fuse/cuse.c index adbfd66b380f..24da581cb52b 100644 --- a/fs/fuse/cuse.c +++ b/fs/fuse/cuse.c @@ -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; diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index 09c2300ddb37..c8cf093d8b71 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h @@ -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 |