cuse: add fix minor number to /dev/cuse
authorTom Gundersen <teg@jklm.no>
Mon, 9 Sep 2013 18:18:27 +0000 (20:18 +0200)
committerMiklos Szeredi <mszeredi@suse.cz>
Tue, 1 Oct 2013 14:44:54 +0000 (16:44 +0200)
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>
Documentation/devices.txt
fs/fuse/cuse.c
include/linux/miscdevice.h

index 23721d3be3e6160e2057b0b11ef002e2828f458f..80b72419ffd8a83dfc8e150d5f5088ec69e4f0d9 100644 (file)
@@ -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
index adbfd66b380f6bbc3d275234851746ba0c33c6d4..24da581cb52b32277d8ca17d5e05bf11ee93b5a7 100644 (file)
@@ -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;
index 09c2300ddb3723188636867fa9b5c21bddab47df..c8cf093d8b71bb80699e6439f57d7b624943ad6d 100644 (file)
@@ -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