1 diff -urN linux-2.6.19.old/arch/cris/arch-v10/kernel/debugport.c linux-2.6.19.dev/arch/cris/arch-v10/kernel/debugport.c
2 --- linux-2.6.19.old/arch/cris/arch-v10/kernel/debugport.c 2006-11-29 22:57:37.000000000 +0100
3 +++ linux-2.6.19.dev/arch/cris/arch-v10/kernel/debugport.c 2006-12-14 03:12:59.000000000 +0100
5 dummy_driver.init_termios = tty_std_termios;
6 dummy_driver.init_termios.c_cflag =
7 B115200 | CS8 | CREAD | HUPCL | CLOCAL; /* is normally B9600 default... */
8 - dummy_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
9 + dummy_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
11 dummy_driver.open = dummy_open;
12 dummy_driver.close = dummy_close;
13 diff -urN linux-2.6.19.old/arch/cris/arch-v32/kernel/debugport.c linux-2.6.19.dev/arch/cris/arch-v32/kernel/debugport.c
14 --- linux-2.6.19.old/arch/cris/arch-v32/kernel/debugport.c 2006-11-29 22:57:37.000000000 +0100
15 +++ linux-2.6.19.dev/arch/cris/arch-v32/kernel/debugport.c 2006-12-14 03:12:59.000000000 +0100
17 dummy_driver.init_termios = tty_std_termios;
18 dummy_driver.init_termios.c_cflag =
19 B115200 | CS8 | CREAD | HUPCL | CLOCAL; /* is normally B9600 default... */
20 - dummy_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
21 + dummy_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
23 dummy_driver.open = dummy_open;
24 dummy_driver.close = dummy_close;
25 diff -urN linux-2.6.19.old/arch/i386/kernel/microcode.c linux-2.6.19.dev/arch/i386/kernel/microcode.c
26 --- linux-2.6.19.old/arch/i386/kernel/microcode.c 2006-11-29 22:57:37.000000000 +0100
27 +++ linux-2.6.19.dev/arch/i386/kernel/microcode.c 2006-12-14 03:12:59.000000000 +0100
29 static struct miscdevice microcode_dev = {
30 .minor = MICROCODE_MINOR,
32 + .devfs_name = "cpu/microcode",
33 .fops = µcode_fops,
36 diff -urN linux-2.6.19.old/arch/ppc/4xx_io/serial_sicc.c linux-2.6.19.dev/arch/ppc/4xx_io/serial_sicc.c
37 --- linux-2.6.19.old/arch/ppc/4xx_io/serial_sicc.c 2006-11-29 22:57:37.000000000 +0100
38 +++ linux-2.6.19.dev/arch/ppc/4xx_io/serial_sicc.c 2006-12-14 03:12:59.000000000 +0100
40 siccnormal_driver->subtype = SERIAL_TYPE_NORMAL;
41 siccnormal_driver->init_termios = tty_std_termios;
42 siccnormal_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
43 - siccnormal_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
44 + siccnormal_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
45 tty_set_operations(siccnormal_driver, &sicc_ops);
47 if (tty_register_driver(siccnormal_driver))
48 diff -urN linux-2.6.19.old/arch/sparc64/solaris/socksys.c linux-2.6.19.dev/arch/sparc64/solaris/socksys.c
49 --- linux-2.6.19.old/arch/sparc64/solaris/socksys.c 2006-11-29 22:57:37.000000000 +0100
50 +++ linux-2.6.19.dev/arch/sparc64/solaris/socksys.c 2006-12-14 03:12:59.000000000 +0100
52 #include <linux/slab.h>
53 #include <linux/syscalls.h>
55 +#include <linux/devfs_fs_kernel.h>
63 + devfs_mk_cdev(MKDEV(30, 0), S_IFCHR|S_IRUSR|S_IWUSR, "socksys");
66 /* N.B. Is this valid? Suppose the f_ops are in a module ... */
67 socksys_file_ops = *file->f_op;
70 if (unregister_chrdev(30, "socksys"))
71 printk ("Couldn't unregister socksys character device\n");
72 + devfs_remove ("socksys");
74 diff -urN linux-2.6.19.old/arch/um/drivers/line.c linux-2.6.19.dev/arch/um/drivers/line.c
75 --- linux-2.6.19.old/arch/um/drivers/line.c 2006-11-29 22:57:37.000000000 +0100
76 +++ linux-2.6.19.dev/arch/um/drivers/line.c 2006-12-14 03:12:59.000000000 +0100
78 #include "linux/list.h"
80 #include "linux/interrupt.h"
81 +#include "linux/devfs_fs_kernel.h"
82 #include "asm/uaccess.h"
83 #include "chan_kern.h"
87 driver->driver_name = line_driver->name;
88 driver->name = line_driver->device_name;
89 + driver->devfs_name = line_driver->devfs_name;
90 driver->major = line_driver->major;
91 driver->minor_start = line_driver->minor_start;
92 driver->type = line_driver->type;
93 diff -urN linux-2.6.19.old/arch/um/drivers/ssl.c linux-2.6.19.dev/arch/um/drivers/ssl.c
94 --- linux-2.6.19.old/arch/um/drivers/ssl.c 2006-11-29 22:57:37.000000000 +0100
95 +++ linux-2.6.19.dev/arch/um/drivers/ssl.c 2006-12-14 03:12:59.000000000 +0100
97 static struct line_driver driver = {
98 .name = "UML serial line",
99 .device_name = "ttyS",
100 + .devfs_name = "tts/",
103 .type = TTY_DRIVER_TYPE_SERIAL,
104 diff -urN linux-2.6.19.old/arch/um/drivers/stdio_console.c linux-2.6.19.dev/arch/um/drivers/stdio_console.c
105 --- linux-2.6.19.old/arch/um/drivers/stdio_console.c 2006-11-29 22:57:37.000000000 +0100
106 +++ linux-2.6.19.dev/arch/um/drivers/stdio_console.c 2006-12-14 03:12:59.000000000 +0100
108 static struct line_driver driver = {
109 .name = "UML console",
110 .device_name = "tty",
111 + .devfs_name = "vc/",
114 .type = TTY_DRIVER_TYPE_CONSOLE,
115 diff -urN linux-2.6.19.old/arch/um/drivers/ubd_kern.c linux-2.6.19.dev/arch/um/drivers/ubd_kern.c
116 --- linux-2.6.19.old/arch/um/drivers/ubd_kern.c 2006-11-29 22:57:37.000000000 +0100
117 +++ linux-2.6.19.dev/arch/um/drivers/ubd_kern.c 2006-12-14 03:12:59.000000000 +0100
119 #include "linux/blkdev.h"
120 #include "linux/hdreg.h"
121 #include "linux/init.h"
122 +#include "linux/devfs_fs_kernel.h"
123 #include "linux/cdrom.h"
124 #include "linux/proc_fs.h"
125 #include "linux/ctype.h"
126 @@ -645,10 +646,14 @@
127 disk->first_minor = unit << UBD_SHIFT;
128 disk->fops = &ubd_blops;
129 set_capacity(disk, size / 512);
130 - if(major == MAJOR_NR)
131 + if(major == MAJOR_NR){
132 sprintf(disk->disk_name, "ubd%c", 'a' + unit);
134 + sprintf(disk->devfs_name, "ubd/disc%d", unit);
137 sprintf(disk->disk_name, "ubd_fake%d", unit);
138 + sprintf(disk->devfs_name, "ubd_fake/disc%d", unit);
141 /* sysfs register (not for ide fake devices) */
142 if (major == MAJOR_NR) {
147 + devfs_mk_dir("ubd");
148 if (register_blkdev(MAJOR_NR, "ubd"))
152 char name[sizeof("ubd_nnn\0")];
154 snprintf(name, sizeof(name), "ubd_%d", fake_major);
155 + devfs_mk_dir(name);
156 if (register_blkdev(fake_major, "ubd"))
159 diff -urN linux-2.6.19.old/arch/um/include/line.h linux-2.6.19.dev/arch/um/include/line.h
160 --- linux-2.6.19.old/arch/um/include/line.h 2006-11-29 22:57:37.000000000 +0100
161 +++ linux-2.6.19.dev/arch/um/include/line.h 2006-12-14 03:12:59.000000000 +0100
170 diff -urN linux-2.6.19.old/Documentation/Changes linux-2.6.19.dev/Documentation/Changes
171 --- linux-2.6.19.old/Documentation/Changes 2006-11-29 22:57:37.000000000 +0100
172 +++ linux-2.6.19.dev/Documentation/Changes 2006-12-14 03:12:59.000000000 +0100
176 A driver has been added to allow updating of Intel IA32 microcode,
177 -accessible as a normal (misc) character device. If you are not using
178 -udev you may need to:
179 +accessible as both a devfs regular file and as a normal (misc)
180 +character device. If you are not using devfs you may need to:
183 mknod /dev/cpu/microcode c 10 184
187 udev is a userspace application for populating /dev dynamically with
188 -only entries for devices actually present. udev replaces the basic
189 -functionality of devfs, while allowing persistant device naming for
191 +only entries for devices actually present. udev replaces devfs.
195 @@ -232,13 +230,18 @@
196 enable it to operate over diverse media layers. If you use PPP,
197 upgrade pppd to at least 2.4.0.
199 -If you are not using udev, you must have the device file /dev/ppp
200 +If you are not using devfs, you must have the device file /dev/ppp
201 which can be made by:
203 mknod /dev/ppp c 108 0
207 +If you use devfsd and build ppp support as modules, you will need
208 +the following in your /etc/devfsd.conf file:
215 diff -urN linux-2.6.19.old/Documentation/DocBook/kernel-api.tmpl linux-2.6.19.dev/Documentation/DocBook/kernel-api.tmpl
216 --- linux-2.6.19.old/Documentation/DocBook/kernel-api.tmpl 2006-11-29 22:57:37.000000000 +0100
217 +++ linux-2.6.19.dev/Documentation/DocBook/kernel-api.tmpl 2006-12-14 03:12:59.000000000 +0100
222 + <chapter id="devfs">
223 + <title>The Device File System</title>
228 diff -urN linux-2.6.19.old/Documentation/filesystems/devfs/boot-options linux-2.6.19.dev/Documentation/filesystems/devfs/boot-options
229 --- linux-2.6.19.old/Documentation/filesystems/devfs/boot-options 1970-01-01 01:00:00.000000000 +0100
230 +++ linux-2.6.19.dev/Documentation/filesystems/devfs/boot-options 2006-12-14 03:12:59.000000000 +0100
232 +/* -*- auto-fill -*- */
234 + Device File System (devfs) Boot Options
236 + Richard Gooch <rgooch@atnf.csiro.au>
241 +When CONFIG_DEVFS_DEBUG is enabled, you can pass several boot options
242 +to the kernel to debug devfs. The boot options are prefixed by
243 +"devfs=", and are separated by commas. Spaces are not allowed. The
244 +syntax looks like this:
246 +devfs=<option1>,<option2>,<option3>
248 +and so on. For example, if you wanted to turn on debugging for module
249 +load requests and device registration, you would do:
253 +You may prefix "no" to any option. This will invert the option.
259 +These requires CONFIG_DEVFS_DEBUG to be enabled.
260 +Note that all debugging options have 'd' as the first character. By
261 +default all options are off. All debugging output is sent to the
262 +kernel logs. The debugging options do not take effect until the devfs
263 +version message appears (just prior to the root filesystem being
266 +These are the options:
268 +dmod print module load requests to <request_module>
270 +dreg print device register requests to <devfs_register>
272 +dunreg print device unregister requests to <devfs_unregister>
274 +dchange print device change requests to <devfs_set_flags>
276 +dilookup print inode lookup requests
278 +diget print VFS inode allocations
280 +diunlink print inode unlinks
282 +dichange print inode changes
284 +dimknod print calls to mknod(2)
286 +dall some debugging turned on
292 +These control the default behaviour of devfs. The options are:
294 +mount mount devfs onto /dev at boot time
296 +only disable non-devfs device nodes for devfs-capable drivers
297 diff -urN linux-2.6.19.old/Documentation/filesystems/devfs/ChangeLog linux-2.6.19.dev/Documentation/filesystems/devfs/ChangeLog
298 --- linux-2.6.19.old/Documentation/filesystems/devfs/ChangeLog 1970-01-01 01:00:00.000000000 +0100
299 +++ linux-2.6.19.dev/Documentation/filesystems/devfs/ChangeLog 2006-12-14 03:12:59.000000000 +0100
301 +/* -*- auto-fill -*- */
302 +===============================================================================
303 +Changes for patch v1
307 +- modified miscellaneous character devices to support devfs
308 +===============================================================================
309 +Changes for patch v2
311 +- bug fix with manual inode creation
312 +===============================================================================
313 +Changes for patch v3
317 +- documentation improvements
319 +- created a couple of scripts (one to save&restore a devfs and the
320 + other to set up compatibility symlinks)
322 +- devfs support for SCSI discs. New name format is: sd_hHcCiIlL
323 +===============================================================================
324 +Changes for patch v4
326 +- bugfix for the directory reading code
328 +- bugfix for compilation with kerneld
330 +- devfs support for generic hard discs
332 +- rationalisation of the various watchdog drivers
333 +===============================================================================
334 +Changes for patch v5
336 +- support for mounting directly from entries in the devfs (it doesn't
337 + need to be mounted to do this), including the root filesystem.
338 + Mounting of swap partitions also works. Hence, now if you set
339 + CONFIG_DEVFS_ONLY to 'Y' then you won't be able to access your discs
340 + via ordinary device nodes. Naturally, the default is 'N' so that you
341 + can still use your old device nodes. If you want to mount from devfs
342 + entries, make sure you use: append = "root=/dev/sd_..." in your
343 + lilo.conf. It seems LILO looks for the device number (major&minor)
344 + and writes that into the kernel image :-(
346 +- support for character memory devices (/dev/null, /dev/zero, /dev/full
347 + and so on). Thanks to C. Scott Ananian <cananian@alumni.princeton.edu>
348 +===============================================================================
349 +Changes for patch v6
351 +- support for subdirectories
353 +- support for symbolic links (created by devfs_mk_symlink(), no
354 + support yet for creation via symlink(2))
356 +- SCSI disc naming now cast in stone, with the format:
357 + /dev/sd/c0b1t2u3 controller=0, bus=1, ID=2, LUN=3, whole disc
358 + /dev/sd/c0b1t2u3p4 controller=0, bus=1, ID=2, LUN=3, 4th partition
360 +- loop devices now appear in devfs
362 +- tty devices, console, serial ports, etc. now appear in devfs
363 + Thanks to C. Scott Ananian <cananian@alumni.princeton.edu>
365 +- bugs with mounting devfs-only devices now fixed
366 +===============================================================================
367 +Changes for patch v7
369 +- SCSI CD-ROMS, tapes and generic devices now appear in devfs
370 +===============================================================================
371 +Changes for patch v8
373 +- bugfix with no-rewind SCSI tapes
375 +- RAMDISCs now appear in devfs
377 +- better cleaning up of devfs entries created by various modules
379 +- interface change to <devfs_register>
380 +===============================================================================
381 +Changes for patch v9
383 +- the v8 patch was corrupted somehow, which would affect the patch for
384 + linux/fs/filesystems.c
385 + I've also fixed the v8 patch file on the WWW
387 +- MetaDevices (/dev/md*) should now appear in devfs
388 +===============================================================================
389 +Changes for patch v10
391 +- bugfix in meta device support for devfs
393 +- created this ChangeLog file
395 +- added devfs support to the floppy driver
397 +- added support for creating sockets in a devfs
398 +===============================================================================
399 +Changes for patch v11
401 +- added DEVFS_FL_HIDE_UNREG flag
403 +- incorporated better patch for ttyname() in libc 5.4.43 from H.J. Lu.
405 +- interface change to <devfs_mk_symlink>
407 +- support for creating symlinks with symlink(2)
409 +- parallel port printer (/dev/lp*) now appears in devfs
410 +===============================================================================
411 +Changes for patch v12
413 +- added inode check to <devfs_fill_file> function
415 +- improved devfs support when mounting from devfs
417 +- added call to <<release>> operation when removing swap areas on
420 +- increased NR_SUPER to 128 to support large numbers of devfs mounts
421 + (for chroot(2) gaols)
423 +- fixed bug in SCSI disc support: was generating incorrect minors if
424 + SCSI ID's did not start at 0 and increase by 1
426 +- support symlink traversal when mounting root
427 +===============================================================================
428 +Changes for patch v13
430 +- added devfs support to soundcard driver
431 + Thanks to Eric Dumas <dumas@linux.eu.org> and
432 + C. Scott Ananian <cananian@alumni.princeton.edu>
434 +- added devfs support to the joystick driver
436 +- loop driver now has it's own subdirectory "/dev/loop/"
438 +- created <devfs_get_flags> and <devfs_set_flags> functions
440 +- fix problem with SCSI disc compatibility names (sd{a,b,c,d,e,f})
441 + which assumes ID's start at 0 and increase by 1. Also only create
442 + devfs entries for SCSI disc partitions which actually exist
443 + Show new names in partition check
444 + Thanks to Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
445 +===============================================================================
446 +Changes for patch v14
448 +- bug fix in floppy driver: would not compile without
449 + CONFIG_DEVFS_FS='Y'
450 + Thanks to Jurgen Botz <jbotz@nova.botz.org>
452 +- bug fix in loop driver
453 + Thanks to C. Scott Ananian <cananian@alumni.princeton.edu>
455 +- do not create devfs entries for printers not configured
456 + Thanks to C. Scott Ananian <cananian@alumni.princeton.edu>
458 +- do not create devfs entries for serial ports not present
459 + Thanks to C. Scott Ananian <cananian@alumni.princeton.edu>
461 +- ensure <tty_register_devfs> is exported from tty_io.c
462 + Thanks to C. Scott Ananian <cananian@alumni.princeton.edu>
464 +- allow unregistering of devfs symlink entries
466 +- fixed bug in SCSI disc naming introduced in last patch version
467 +===============================================================================
468 +Changes for patch v15
470 +- ported to kernel 2.1.81
471 +===============================================================================
472 +Changes for patch v16
474 +- created <devfs_set_symlink_destination> function
476 +- moved DEVFS_SUPER_MAGIC into header file
478 +- added DEVFS_FL_HIDE flag
480 +- created <devfs_get_maj_min>
482 +- created <devfs_get_handle_from_inode>
484 +- fixed bugs in searching by major&minor
486 +- changed interface to <devfs_unregister>, <devfs_fill_file> and
487 + <devfs_find_handle>
489 +- fixed inode times when symlink created with symlink(2)
491 +- change tty driver to do auto-creation of devfs entries
492 + Thanks to C. Scott Ananian <cananian@alumni.princeton.edu>
494 +- fixed bug in genhd.c: whole disc (non-SCSI) was not registered to
497 +- updated libc 5.4.43 patch for ttyname()
498 +===============================================================================
499 +Changes for patch v17
501 +- added CONFIG_DEVFS_TTY_COMPAT
502 + Thanks to C. Scott Ananian <cananian@alumni.princeton.edu>
504 +- bugfix in devfs support for drivers/char/lp.c
505 + Thanks to C. Scott Ananian <cananian@alumni.princeton.edu>
507 +- clean up serial driver so that PCMCIA devices unregister correctly
508 + Thanks to C. Scott Ananian <cananian@alumni.princeton.edu>
510 +- fixed bug in genhd.c: whole disc (non-SCSI) was not registered to
511 + devfs [was missing in patch v16]
513 +- updated libc 5.4.43 patch for ttyname() [was missing in patch v16]
515 +- all SCSI devices now registered in /dev/sg
517 +- support removal of devfs entries via unlink(2)
518 +===============================================================================
519 +Changes for patch v18
521 +- added floppy/?u720 floppy entry
523 +- fixed kerneld support for entries in devfs subdirectories
525 +- incorporated latest patch for ttyname() in libc 5.4.43 from H.J. Lu.
526 +===============================================================================
527 +Changes for patch v19
529 +- bug fix when looking up unregistered entries: kerneld was not called
531 +- fixes for kernel 2.1.86 (now requires 2.1.86)
532 +===============================================================================
533 +Changes for patch v20
535 +- only create available floppy entries
536 + Thanks to Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl>
538 +- new IDE naming scheme following SCSI format (i.e. /dev/id/c0b0t0u0p1
539 + instead of /dev/hda1)
540 + Thanks to Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl>
542 +- new XT disc naming scheme following SCSI format (i.e. /dev/xd/c0t0p1
543 + instead of /dev/xda1)
544 + Thanks to Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl>
546 +- new non-standard CD-ROM names (i.e. /dev/sbp/c#t#)
547 + Thanks to Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl>
549 +- allow symlink traversal when mounting the root filesystem
551 +- Create entries for MD devices at MD init
552 + Thanks to Christophe Leroy <christophe.leroy5@capway.com>
553 +===============================================================================
554 +Changes for patch v21
556 +- ported to kernel 2.1.91
557 +===============================================================================
558 +Changes for patch v22
560 +- SCSI host number patch ("scsihosts=" kernel option)
561 + Thanks to Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl>
562 +===============================================================================
563 +Changes for patch v23
565 +- Fixed persistence bug with device numbers for manually created
568 +- Fixed problem with recreating symlinks with different content
570 +- Added CONFIG_DEVFS_MOUNT (mount devfs on /dev at boot time)
571 +===============================================================================
572 +Changes for patch v24
574 +- Switched from CONFIG_KERNELD to CONFIG_KMOD: module autoloading
575 + should now work again
577 +- Hide entries which are manually unlinked
579 +- Always invalidate devfs dentry cache when registering entries
581 +- Support removal of devfs directories via rmdir(2)
583 +- Ensure directories created by <devfs_mk_dir> are visible
585 +- Default no access for "other" for floppy device
586 +===============================================================================
587 +Changes for patch v25
589 +- Updates to CREDITS file and minor IDE numbering change
590 + Thanks to Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl>
592 +- Invalidate devfs dentry cache when making directories
594 +- Invalidate devfs dentry cache when removing entries
596 +- More informative message if root FS mount fails when devfs
599 +- Fixed persistence bug with fifos
600 +===============================================================================
601 +Changes for patch v26
603 +- ported to kernel 2.1.97
605 +- Changed serial directory from "/dev/serial" to "/dev/tts" and
606 + "/dev/consoles" to "/dev/vc" to be more friendly to new procps
607 +===============================================================================
608 +Changes for patch v27
610 +- Added support for IDE4 and IDE5
611 + Thanks to Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl>
613 +- Documented "scsihosts=" boot parameter
615 +- Print process command when debugging kerneld/kmod
617 +- Added debugging for register/unregister/change operations
619 +- Added "devfs=" boot options
621 +- Hide unregistered entries by default
622 +===============================================================================
623 +Changes for patch v28
625 +- No longer lock/unlock superblock in <devfs_put_super> (cope with
626 + recent VFS interface change)
628 +- Do not automatically change ownership/protection of /dev/tty
630 +- Drop negative dentries when they are released
632 +- Manage dcache more efficiently
633 +===============================================================================
634 +Changes for patch v29
636 +- Added DEVFS_FL_AUTO_DEVNUM flag
637 +===============================================================================
638 +Changes for patch v30
640 +- No longer set unnecessary methods
642 +- Ported to kernel 2.1.99-pre3
643 +===============================================================================
644 +Changes for patch v31
646 +- Added PID display to <call_kerneld> debugging message
648 +- Added "diread" and "diwrite" options
650 +- Ported to kernel 2.1.102
652 +- Fixed persistence problem with permissions
653 +===============================================================================
654 +Changes for patch v32
656 +- Fixed devfs support in drivers/block/md.c
657 +===============================================================================
658 +Changes for patch v33
660 +- Support legacy device nodes
662 +- Fixed bug where recreated inodes were hidden
664 +- New IDE naming scheme: everything is under /dev/ide
665 +===============================================================================
666 +Changes for patch v34
668 +- Improved debugging in <get_vfs_inode>
670 +- Prevent duplicate calls to <devfs_mk_dir> in SCSI layer
672 +- No longer free old dentries in <devfs_mk_dir>
674 +- Free all dentries for a given entry when deleting inodes
675 +===============================================================================
676 +Changes for patch v35
678 +- Ported to kernel 2.1.105 (sound driver changes)
679 +===============================================================================
680 +Changes for patch v36
682 +- Fixed sound driver port
683 +===============================================================================
684 +Changes for patch v37
686 +- Minor documentation tweaks
687 +===============================================================================
688 +Changes for patch v38
690 +- More documentation tweaks
692 +- Fix for sound driver port
694 +- Removed ttyname-patch (grab libc 5.4.44 instead)
696 +- Ported to kernel 2.1.107-pre2 (loop driver fix)
697 +===============================================================================
698 +Changes for patch v39
700 +- Ported to kernel 2.1.107 (hd.c hunk broke due to spelling "fixes"). Sigh
702 +- Removed many #ifdef's, replaced with trickery in include/devfs_fs.h
703 +===============================================================================
704 +Changes for patch v40
706 +- Fix for sound driver port
708 +- Limit auto-device numbering to majors 128 to 239
709 +===============================================================================
710 +Changes for patch v41
712 +- Fixed inode times persistence problem
713 +===============================================================================
714 +Changes for patch v42
716 +- Ported to kernel 2.1.108 (drivers/scsi/hosts.c hunk broke)
717 +===============================================================================
718 +Changes for patch v43
720 +- Fixed spelling in <devfs_readlink> debug
722 +- Fixed bug in <devfs_setup> parsing "dilookup"
724 +- More #ifdef's removed
726 +- Supported Sparc keyboard (/dev/kbd)
728 +- Supported DSP56001 digital signal processor (/dev/dsp56k)
730 +- Supported Apple Desktop Bus (/dev/adb)
732 +- Supported Coda network file system (/dev/cfs*)
733 +===============================================================================
734 +Changes for patch v44
736 +- Fixed devfs inode leak when manually recreating inodes
738 +- Fixed permission persistence problem when recreating inodes
739 +===============================================================================
740 +Changes for patch v45
742 +- Ported to kernel 2.1.110
743 +===============================================================================
744 +Changes for patch v46
746 +- Ported to kernel 2.1.112-pre1
748 +- Removed harmless "unused variable" compiler warning
750 +- Fixed modes for manually recreated device nodes
751 +===============================================================================
752 +Changes for patch v47
754 +- Added NULL devfs inode warning in <devfs_read_inode>
756 +- Force all inode nlink values to 1
757 +===============================================================================
758 +Changes for patch v48
760 +- Added "dimknod" option
762 +- Set inode nlink to 0 when freeing dentries
764 +- Added support for virtual console capture devices (/dev/vcs*)
765 + Thanks to Dennis Hou <smilax@mindmeld.yi.org>
767 +- Fixed modes for manually recreated symlinks
768 +===============================================================================
769 +Changes for patch v49
771 +- Ported to kernel 2.1.113
772 +===============================================================================
773 +Changes for patch v50
775 +- Fixed bugs in recreated directories and symlinks
776 +===============================================================================
777 +Changes for patch v51
779 +- Improved robustness of rc.devfs script
780 + Thanks to Roderich Schupp <rsch@experteam.de>
782 +- Fixed bugs in recreated device nodes
784 +- Fixed bug in currently unused <devfs_get_handle_from_inode>
786 +- Defined new <devfs_handle_t> type
788 +- Improved debugging when getting entries
790 +- Fixed bug where directories could be emptied
792 +- Ported to kernel 2.1.115
793 +===============================================================================
794 +Changes for patch v52
796 +- Replaced dummy .epoch inode with .devfsd character device
798 +- Modified rc.devfs to take account of above change
800 +- Removed spurious driver warning messages when CONFIG_DEVFS_FS=n
802 +- Implemented devfsd protocol revision 0
803 +===============================================================================
804 +Changes for patch v53
806 +- Ported to kernel 2.1.116 (kmod change broke hunk)
808 +- Updated Documentation/Configure.help
810 +- Test and tty pattern patch for rc.devfs script
811 + Thanks to Roderich Schupp <rsch@experteam.de>
813 +- Added soothing message to warning in <devfs_d_iput>
814 +===============================================================================
815 +Changes for patch v54
817 +- Ported to kernel 2.1.117
819 +- Fixed default permissions in sound driver
821 +- Added support for frame buffer devices (/dev/fb*)
822 +===============================================================================
823 +Changes for patch v55
825 +- Ported to kernel 2.1.119
827 +- Use GCC extensions for structure initialisations
829 +- Implemented async open notification
831 +- Incremented devfsd protocol revision to 1
832 +===============================================================================
833 +Changes for patch v56
835 +- Ported to kernel 2.1.120-pre3
837 +- Moved async open notification to end of <devfs_open>
838 +===============================================================================
839 +Changes for patch v57
841 +- Ported to kernel 2.1.121
843 +- Prepended "/dev/" to module load request
845 +- Renamed <call_kerneld> to <call_kmod>
847 +- Created sample modules.conf file
848 +===============================================================================
849 +Changes for patch v58
851 +- Fixed typo "AYSNC" -> "ASYNC"
852 +===============================================================================
853 +Changes for patch v59
855 +- Added open flag for files
856 +===============================================================================
857 +Changes for patch v60
859 +- Ported to kernel 2.1.123-pre2
860 +===============================================================================
861 +Changes for patch v61
863 +- Set i_blocks=0 and i_blksize=1024 in <devfs_read_inode>
864 +===============================================================================
865 +Changes for patch v62
867 +- Ported to kernel 2.1.123
868 +===============================================================================
869 +Changes for patch v63
871 +- Ported to kernel 2.1.124-pre2
872 +===============================================================================
873 +Changes for patch v64
875 +- Fixed Unix98 pty support
877 +- Increased buffer size in <get_partition_list> to avoid crash and
879 +===============================================================================
880 +Changes for patch v65
882 +- More Unix98 pty support fixes
884 +- Added test for empty <<name>> in <devfs_find_handle>
886 +- Renamed <generate_path> to <devfs_generate_path> and published
888 +- Created /dev/root symlink
889 + Thanks to Roderich Schupp <rsch@ExperTeam.de>
890 + with further modifications by me
891 +===============================================================================
892 +Changes for patch v66
894 +- Yet more Unix98 pty support fixes (now tested)
896 +- Created <devfs_get_fops>
898 +- Support media change checks when CONFIG_DEVFS_ONLY=y
900 +- Abolished Unix98-style PTY names for old PTY devices
901 +===============================================================================
902 +Changes for patch v67
904 +- Added inline declaration for dummy <devfs_generate_path>
906 +- Removed spurious "unable to register... in devfs" messages when
909 +- Fixed misc. devices when CONFIG_DEVFS_FS=n
911 +- Limit auto-device numbering to majors 144 to 239
912 +===============================================================================
913 +Changes for patch v68
915 +- Hide unopened virtual consoles from directory listings
917 +- Added support for video capture devices
919 +- Ported to kernel 2.1.125
920 +===============================================================================
921 +Changes for patch v69
923 +- Fix for CONFIG_VT=n
924 +===============================================================================
925 +Changes for patch v70
927 +- Added support for non-OSS/Free sound cards
928 +===============================================================================
929 +Changes for patch v71
931 +- Ported to kernel 2.1.126-pre2
932 +===============================================================================
933 +Changes for patch v72
935 +- #ifdef's for CONFIG_DEVFS_DISABLE_OLD_NAMES removed
936 +===============================================================================
937 +Changes for patch v73
939 +- CONFIG_DEVFS_DISABLE_OLD_NAMES replaced with "nocompat" boot option
941 +- CONFIG_DEVFS_BOOT_OPTIONS removed: boot options always available
942 +===============================================================================
943 +Changes for patch v74
945 +- Removed CONFIG_DEVFS_MOUNT and "mount" boot option and replaced with
946 + "nomount" boot option
948 +- Documentation updates
950 +- Updated sample modules.conf
951 +===============================================================================
952 +Changes for patch v75
954 +- Updated sample modules.conf
956 +- Remount devfs after initrd finishes
958 +- Ported to kernel 2.1.127
960 +- Added support for ISDN
961 + Thanks to Christophe Leroy <christophe.leroy5@capway.com>
962 +===============================================================================
963 +Changes for patch v76
965 +- Updated an email address in ChangeLog
967 +- CONFIG_DEVFS_ONLY replaced with "only" boot option
968 +===============================================================================
969 +Changes for patch v77
971 +- Added DEVFS_FL_REMOVABLE flag
973 +- Check for disc change when listing directories with removable media
976 +- Use DEVFS_FL_REMOVABLE in sd.c
978 +- Ported to kernel 2.1.128
979 +===============================================================================
980 +Changes for patch v78
982 +- Only call <scan_dir_for_removable> on first call to <devfs_readdir>
984 +- Ported to kernel 2.1.129-pre5
986 +- ISDN support improvements
987 + Thanks to Christophe Leroy <christophe.leroy5@capway.com>
988 +===============================================================================
989 +Changes for patch v79
991 +- Ported to kernel 2.1.130
993 +- Renamed miscdevice "apm" to "apm_bios" to be consistent with
995 +===============================================================================
996 +Changes for patch v80
998 +- Ported to kernel 2.1.131
1000 +- Updated <devfs_rmdir> for VFS change in 2.1.131
1001 +===============================================================================
1002 +Changes for patch v81
1004 +- Fixed permissions on /dev/ptmx
1005 +===============================================================================
1006 +Changes for patch v82
1008 +- Ported to kernel 2.1.132-pre4
1010 +- Changed initial permissions on /dev/pts/*
1012 +- Created <devfs_mk_compat>
1014 +- Added "symlinks" boot option
1016 +- Changed devfs_register_blkdev() back to register_blkdev() for IDE
1018 +- Check for partitions on removable media in <devfs_lookup>
1019 +===============================================================================
1020 +Changes for patch v83
1022 +- Fixed support for ramdisc when using string-based root FS name
1024 +- Ported to kernel 2.2.0-pre1
1025 +===============================================================================
1026 +Changes for patch v84
1028 +- Ported to kernel 2.2.0-pre7
1029 +===============================================================================
1030 +Changes for patch v85
1032 +- Compile fixes for driver/sound/sound_common.c (non-module) and
1033 + drivers/isdn/isdn_common.c
1034 + Thanks to Christophe Leroy <christophe.leroy5@capway.com>
1036 +- Added support for registering regular files
1038 +- Created <devfs_set_file_size>
1040 +- Added /dev/cpu/mtrr as an alternative interface to /proc/mtrr
1042 +- Update devfs inodes from entries if not changed through FS
1043 +===============================================================================
1044 +Changes for patch v86
1046 +- Ported to kernel 2.2.0-pre9
1047 +===============================================================================
1048 +Changes for patch v87
1050 +- Fixed bug when mounting non-devfs devices in a devfs
1051 +===============================================================================
1052 +Changes for patch v88
1054 +- Fixed <devfs_fill_file> to only initialise temporary inodes
1056 +- Trap for NULL fops in <devfs_register>
1058 +- Return -ENODEV in <devfs_fill_file> for non-driver inodes
1060 +- Fixed bug when unswapping non-devfs devices in a devfs
1061 +===============================================================================
1062 +Changes for patch v89
1064 +- Switched to C data types in include/linux/devfs_fs.h
1066 +- Switched from PATH_MAX to DEVFS_PATHLEN
1068 +- Updated Documentation/filesystems/devfs/modules.conf to take account
1069 + of reverse scanning (!) by modprobe
1071 +- Ported to kernel 2.2.0
1072 +===============================================================================
1073 +Changes for patch v90
1075 +- CONFIG_DEVFS_DISABLE_OLD_TTY_NAMES replaced with "nottycompat" boot
1078 +- CONFIG_DEVFS_TTY_COMPAT removed: existing "symlinks" boot option now
1079 + controls this. This means you must have libc 5.4.44 or later, or a
1080 + recent version of libc 6 if you use the "symlinks" option
1081 +===============================================================================
1082 +Changes for patch v91
1084 +- Switch from <devfs_mk_symlink> to <devfs_mk_compat> in
1085 + drivers/char/vc_screen.c to fix problems with Midnight Commander
1086 +===============================================================================
1087 +Changes for patch v92
1089 +- Ported to kernel 2.2.2-pre5
1090 +===============================================================================
1091 +Changes for patch v93
1093 +- Modified <sd_name> in drivers/scsi/sd.c to cope with devices that
1094 + don't exist (which happens with new RAID autostart code printk()s)
1095 +===============================================================================
1096 +Changes for patch v94
1098 +- Fixed bug in joystick driver: only first joystick was registered
1099 +===============================================================================
1100 +Changes for patch v95
1102 +- Fixed another bug in joystick driver
1104 +- Fixed <devfsd_read> to not overrun event buffer
1105 +===============================================================================
1106 +Changes for patch v96
1108 +- Ported to kernel 2.2.5-2
1110 +- Created <devfs_auto_unregister>
1112 +- Fixed bugs: compatibility entries were not unregistered for:
1117 + SCSI CD-ROM driver
1119 +===============================================================================
1120 +Changes for patch v97
1122 +- Fixed bugs: compatibility entries were not unregistered for:
1124 + partitions in generic disc driver
1126 +- Don't return unregistred entries in <devfs_find_handle>
1128 +- Panic in <devfs_unregister> if entry unregistered
1130 +- Don't panic in <devfs_auto_unregister> for duplicates
1131 +===============================================================================
1132 +Changes for patch v98
1134 +- Don't unregister already unregistered entries in <unregister>
1136 +- Register entry in <sd_detect>
1138 +- Unregister entry in <sd_detach>
1140 +- Changed to <devfs_*register_chrdev> in drivers/char/tty_io.c
1142 +- Ported to kernel 2.2.7
1143 +===============================================================================
1144 +Changes for patch v99
1146 +- Ported to kernel 2.2.8
1148 +- Fixed bug in drivers/scsi/sd.c when >16 SCSI discs
1150 +- Disable warning messages when unable to read partition table for
1152 +===============================================================================
1153 +Changes for patch v100
1155 +- Ported to kernel 2.3.1-pre5
1157 +- Added "oops-on-panic" boot option
1159 +- Improved debugging in <devfs_register> and <devfs_unregister>
1161 +- Register entry in <sr_detect>
1163 +- Unregister entry in <sr_detach>
1165 +- Register entry in <sg_detect>
1167 +- Unregister entry in <sg_detach>
1169 +- Added support for ALSA drivers
1170 +===============================================================================
1171 +Changes for patch v101
1173 +- Ported to kernel 2.3.2
1174 +===============================================================================
1175 +Changes for patch v102
1177 +- Update serial driver to register PCMCIA entries
1178 + Thanks to Roch-Alexandre Nomine-Beguin <roch@samarkand.infini.fr>
1180 +- Updated an email address in ChangeLog
1182 +- Hide virtual console capture entries from directory listings when
1183 + corresponding console device is not open
1184 +===============================================================================
1185 +Changes for patch v103
1187 +- Ported to kernel 2.3.3
1188 +===============================================================================
1189 +Changes for patch v104
1191 +- Added documentation for some functions
1193 +- Added "doc" target to fs/devfs/Makefile
1195 +- Added "v4l" directory for video4linux devices
1197 +- Replaced call to <devfs_unregister> in <sd_detach> with call to
1198 + <devfs_register_partitions>
1200 +- Moved registration for sr and sg drivers from detect() to attach()
1203 +- Register entries in <st_attach> and unregister in <st_detach>
1205 +- Work around IDE driver treating CD-ROM as gendisk
1207 +- Use <sed> instead of <tr> in rc.devfs
1209 +- Updated ToDo list
1211 +- Removed "oops-on-panic" boot option: now always Oops
1212 +===============================================================================
1213 +Changes for patch v105
1215 +- Unregister SCSI host from <scsi_host_no_list> in <scsi_unregister>
1216 + Thanks to Zoltán Böszörményi <zboszor@mail.externet.hu>
1218 +- Don't save /dev/log in rc.devfs
1220 +- Ported to kernel 2.3.4-pre1
1221 +===============================================================================
1222 +Changes for patch v106
1224 +- Fixed silly typo in drivers/scsi/st.c
1226 +- Improved debugging in <devfs_register>
1227 +===============================================================================
1228 +Changes for patch v107
1230 +- Added "diunlink" and "nokmod" boot options
1232 +- Removed superfluous warning message in <devfs_d_iput>
1233 +===============================================================================
1234 +Changes for patch v108
1236 +- Remove entries when unloading sound module
1237 +===============================================================================
1238 +Changes for patch v109
1240 +- Ported to kernel 2.3.6-pre2
1241 +===============================================================================
1242 +Changes for patch v110
1244 +- Took account of change to <d_alloc_root>
1245 +===============================================================================
1246 +Changes for patch v111
1248 +- Created separate event queue for each mounted devfs
1250 +- Removed <devfs_invalidate_dcache>
1252 +- Created new ioctl()s for devfsd
1254 +- Incremented devfsd protocol revision to 3
1256 +- Fixed bug when re-creating directories: contents were lost
1258 +- Block access to inodes until devfsd updates permissions
1259 +===============================================================================
1260 +Changes for patch v112
1262 +- Modified patch so it applies against 2.3.5 and 2.3.6
1264 +- Updated an email address in ChangeLog
1266 +- Do not automatically change ownership/protection of /dev/tty<n>
1268 +- Updated sample modules.conf
1270 +- Switched to sending process uid/gid to devfsd
1272 +- Renamed <call_kmod> to <try_modload>
1274 +- Added DEVFSD_NOTIFY_LOOKUP event
1276 +- Added DEVFSD_NOTIFY_CHANGE event
1278 +- Added DEVFSD_NOTIFY_CREATE event
1280 +- Incremented devfsd protocol revision to 4
1282 +- Moved kernel-specific stuff to include/linux/devfs_fs_kernel.h
1283 +===============================================================================
1284 +Changes for patch v113
1286 +- Ported to kernel 2.3.9
1288 +- Restricted permissions on some block devices
1289 +===============================================================================
1290 +Changes for patch v114
1292 +- Added support for /dev/netlink
1293 + Thanks to Dennis Hou <smilax@mindmeld.yi.org>
1295 +- Return EISDIR rather than EINVAL for read(2) on directories
1297 +- Ported to kernel 2.3.10
1298 +===============================================================================
1299 +Changes for patch v115
1301 +- Added support for all remaining character devices
1302 + Thanks to Dennis Hou <smilax@mindmeld.yi.org>
1304 +- Cleaned up netlink support
1305 +===============================================================================
1306 +Changes for patch v116
1308 +- Added support for /dev/parport%d
1309 + Thanks to Tim Waugh <tim@cyberelk.demon.co.uk>
1311 +- Fixed parallel port ATAPI tape driver
1313 +- Fixed Atari SLM laser printer driver
1314 +===============================================================================
1315 +Changes for patch v117
1317 +- Added support for COSA card
1318 + Thanks to Dennis Hou <smilax@mindmeld.yi.org>
1320 +- Fixed drivers/char/ppdev.c: missing #include <linux/init.h>
1322 +- Fixed drivers/char/ftape/zftape/zftape-init.c
1323 + Thanks to Vladimir Popov <mashgrad@usa.net>
1324 +===============================================================================
1325 +Changes for patch v118
1327 +- Ported to kernel 2.3.15-pre3
1329 +- Fixed bug in loop driver
1331 +- Unregister /dev/lp%d entries in drivers/char/lp.c
1332 + Thanks to Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1333 +===============================================================================
1334 +Changes for patch v119
1336 +- Ported to kernel 2.3.16
1337 +===============================================================================
1338 +Changes for patch v120
1340 +- Fixed bug in drivers/scsi/scsi.c
1343 + Thanks to Dennis Hou <smilax@mindmeld.yi.org>
1345 +- Ported to kernel 2.3.17
1346 +===============================================================================
1347 +Changes for patch v121
1349 +- Fixed bug in drivers/block/loop.c
1351 +- Ported to kernel 2.3.18
1352 +===============================================================================
1353 +Changes for patch v122
1355 +- Ported to kernel 2.3.19
1356 +===============================================================================
1357 +Changes for patch v123
1359 +- Ported to kernel 2.3.20
1360 +===============================================================================
1361 +Changes for patch v124
1363 +- Ported to kernel 2.3.21
1364 +===============================================================================
1365 +Changes for patch v125
1367 +- Created <devfs_get_info>, <devfs_set_info>,
1368 + <devfs_get_first_child> and <devfs_get_next_sibling>
1369 + Added <<dir>> parameter to <devfs_register>, <devfs_mk_compat>,
1370 + <devfs_mk_dir> and <devfs_find_handle>
1371 + Work sponsored by SGI
1373 +- Fixed apparent bug in COSA driver
1375 +- Re-instated "scsihosts=" boot option
1376 +===============================================================================
1377 +Changes for patch v126
1379 +- Always create /dev/pts if CONFIG_UNIX98_PTYS=y
1381 +- Fixed call to <devfs_mk_dir> in drivers/block/ide-disk.c
1382 + Thanks to Dennis Hou <smilax@mindmeld.yi.org>
1384 +- Allow multiple unregistrations
1386 +- Created /dev/scsi hierarchy
1387 + Work sponsored by SGI
1388 +===============================================================================
1389 +Changes for patch v127
1391 +Work sponsored by SGI
1393 +- No longer disable devpts if devfs enabled (caveat emptor)
1395 +- Added flags array to struct gendisk and removed code from
1398 +- Created /dev/discs hierarchy
1399 +===============================================================================
1400 +Changes for patch v128
1402 +Work sponsored by SGI
1404 +- Created /dev/cdroms hierarchy
1405 +===============================================================================
1406 +Changes for patch v129
1408 +Work sponsored by SGI
1410 +- Removed compatibility entries for sound devices
1412 +- Removed compatibility entries for printer devices
1414 +- Removed compatibility entries for video4linux devices
1416 +- Removed compatibility entries for parallel port devices
1418 +- Removed compatibility entries for frame buffer devices
1419 +===============================================================================
1420 +Changes for patch v130
1422 +Work sponsored by SGI
1424 +- Added major and minor number to devfsd protocol
1426 +- Incremented devfsd protocol revision to 5
1428 +- Removed compatibility entries for SoundBlaster CD-ROMs
1430 +- Removed compatibility entries for netlink devices
1432 +- Removed compatibility entries for SCSI generic devices
1434 +- Removed compatibility entries for SCSI tape devices
1435 +===============================================================================
1436 +Changes for patch v131
1438 +Work sponsored by SGI
1440 +- Support info pointer for all devfs entry types
1442 +- Added <<info>> parameter to <devfs_mk_dir> and <devfs_mk_symlink>
1444 +- Removed /dev/st hierarchy
1446 +- Removed /dev/sg hierarchy
1448 +- Removed compatibility entries for loop devices
1450 +- Removed compatibility entries for IDE tape devices
1452 +- Removed compatibility entries for SCSI CD-ROMs
1454 +- Removed /dev/sr hierarchy
1455 +===============================================================================
1456 +Changes for patch v132
1458 +Work sponsored by SGI
1460 +- Removed compatibility entries for floppy devices
1462 +- Removed compatibility entries for RAMDISCs
1464 +- Removed compatibility entries for meta-devices
1466 +- Removed compatibility entries for SCSI discs
1468 +- Created <devfs_make_root>
1470 +- Removed /dev/sd hierarchy
1472 +- Support "../" when searching devfs namespace
1474 +- Created /dev/ide/host* hierarchy
1476 +- Supported IDE hard discs in /dev/ide/host* hierarchy
1478 +- Removed compatibility entries for IDE discs
1480 +- Removed /dev/ide/hd hierarchy
1482 +- Supported IDE CD-ROMs in /dev/ide/host* hierarchy
1484 +- Removed compatibility entries for IDE CD-ROMs
1486 +- Removed /dev/ide/cd hierarchy
1487 +===============================================================================
1488 +Changes for patch v133
1490 +Work sponsored by SGI
1492 +- Created <devfs_get_unregister_slave>
1494 +- Fixed bug in fs/partitions/check.c when rescanning
1495 +===============================================================================
1496 +Changes for patch v134
1498 +Work sponsored by SGI
1500 +- Removed /dev/sd, /dev/sr, /dev/st and /dev/sg directories
1502 +- Removed /dev/ide/hd directory
1504 +- Exported <devfs_get_parent>
1506 +- Created <devfs_register_tape> and /dev/tapes hierarchy
1508 +- Removed /dev/ide/mt hierarchy
1510 +- Removed /dev/ide/fd hierarchy
1512 +- Ported to kernel 2.3.25
1513 +===============================================================================
1514 +Changes for patch v135
1516 +Work sponsored by SGI
1518 +- Removed compatibility entries for virtual console capture devices
1520 +- Removed unused <devfs_set_symlink_destination>
1522 +- Removed compatibility entries for serial devices
1524 +- Removed compatibility entries for console devices
1526 +- Do not hide entries from devfsd or children
1528 +- Removed DEVFS_FL_TTY_COMPAT flag
1530 +- Removed "nottycompat" boot option
1532 +- Removed <devfs_mk_compat>
1533 +===============================================================================
1534 +Changes for patch v136
1536 +Work sponsored by SGI
1538 +- Moved BSD pty devices to /dev/pty
1540 +- Added DEVFS_FL_WAIT flag
1541 +===============================================================================
1542 +Changes for patch v137
1544 +Work sponsored by SGI
1546 +- Really fixed bug in fs/partitions/check.c when rescanning
1548 +- Support new "disc" naming scheme in <get_removable_partition>
1550 +- Allow NULL fops in <devfs_register>
1552 +- Removed redundant name functions in SCSI disc and IDE drivers
1553 +===============================================================================
1554 +Changes for patch v138
1556 +Work sponsored by SGI
1558 +- Fixed old bugs in drivers/block/paride/pt.c, drivers/char/tpqic02.c,
1559 + drivers/net/wan/cosa.c and drivers/scsi/scsi.c
1560 + Thanks to Sergey Kubushin <ksi@ksi-linux.com>
1562 +- Fall back to major table if NULL fops given to <devfs_register>
1563 +===============================================================================
1564 +Changes for patch v139
1566 +Work sponsored by SGI
1568 +- Corrected and moved <get_blkfops> and <get_chrfops> declarations
1569 + from arch/alpha/kernel/osf_sys.c to include/linux/fs.h
1571 +- Removed name function from struct gendisk
1573 +- Updated devfs FAQ
1574 +===============================================================================
1575 +Changes for patch v140
1577 +Work sponsored by SGI
1579 +- Ported to kernel 2.3.27
1580 +===============================================================================
1581 +Changes for patch v141
1583 +Work sponsored by SGI
1585 +- Bug fix in arch/m68k/atari/joystick.c
1587 +- Moved ISDN and capi devices to /dev/isdn
1588 +===============================================================================
1589 +Changes for patch v142
1591 +Work sponsored by SGI
1593 +- Bug fix in drivers/block/ide-probe.c (patch confusion)
1594 +===============================================================================
1595 +Changes for patch v143
1597 +Work sponsored by SGI
1599 +- Bug fix in drivers/block/blkpg.c:partition_name()
1600 +===============================================================================
1601 +Changes for patch v144
1603 +Work sponsored by SGI
1605 +- Ported to kernel 2.3.29
1607 +- Removed calls to <devfs_register> from cdu31a, cm206, mcd and mcdx
1608 + CD-ROM drivers: generic driver handles this now
1610 +- Moved joystick devices to /dev/joysticks
1611 +===============================================================================
1612 +Changes for patch v145
1614 +Work sponsored by SGI
1616 +- Ported to kernel 2.3.30-pre3
1618 +- Register whole-disc entry even for invalid partition tables
1620 +- Fixed bug in mounting root FS when initrd enabled
1622 +- Fixed device entry leak with IDE CD-ROMs
1624 +- Fixed compile problem with drivers/isdn/isdn_common.c
1626 +- Moved COSA devices to /dev/cosa
1628 +- Support fifos when unregistering
1630 +- Created <devfs_register_series> and used in many drivers
1632 +- Moved Coda devices to /dev/coda
1634 +- Moved parallel port IDE tapes to /dev/pt
1636 +- Moved parallel port IDE generic devices to /dev/pg
1637 +===============================================================================
1638 +Changes for patch v146
1640 +Work sponsored by SGI
1642 +- Removed obsolete DEVFS_FL_COMPAT and DEVFS_FL_TOLERANT flags
1644 +- Fixed compile problem with fs/coda/psdev.c
1646 +- Reinstate change to <devfs_register_blkdev> in
1647 + drivers/block/ide-probe.c now that fs/isofs/inode.c is fixed
1649 +- Switched to <devfs_register_blkdev> in drivers/block/floppy.c,
1650 + drivers/scsi/sr.c and drivers/block/md.c
1652 +- Moved DAC960 devices to /dev/dac960
1653 +===============================================================================
1654 +Changes for patch v147
1656 +Work sponsored by SGI
1658 +- Ported to kernel 2.3.32-pre4
1659 +===============================================================================
1660 +Changes for patch v148
1662 +Work sponsored by SGI
1664 +- Removed kmod support: use devfsd instead
1666 +- Moved miscellaneous character devices to /dev/misc
1667 +===============================================================================
1668 +Changes for patch v149
1670 +Work sponsored by SGI
1672 +- Ensure include/linux/joystick.h is OK for user-space
1674 +- Improved debugging in <get_vfs_inode>
1676 +- Ensure dentries created by devfsd will be cleaned up
1677 +===============================================================================
1678 +Changes for patch v150
1680 +Work sponsored by SGI
1682 +- Ported to kernel 2.3.34
1683 +===============================================================================
1684 +Changes for patch v151
1686 +Work sponsored by SGI
1688 +- Ported to kernel 2.3.35-pre1
1690 +- Created <devfs_get_name>
1691 +===============================================================================
1692 +Changes for patch v152
1694 +Work sponsored by SGI
1696 +- Updated sample modules.conf
1698 +- Ported to kernel 2.3.36-pre1
1699 +===============================================================================
1700 +Changes for patch v153
1702 +Work sponsored by SGI
1704 +- Ported to kernel 2.3.42
1706 +- Removed <devfs_fill_file>
1707 +===============================================================================
1708 +Changes for patch v154
1710 +Work sponsored by SGI
1712 +- Took account of device number changes for /dev/fb*
1713 +===============================================================================
1714 +Changes for patch v155
1716 +Work sponsored by SGI
1718 +- Ported to kernel 2.3.43-pre8
1720 +- Moved /dev/tty0 to /dev/vc/0
1722 +- Moved sequence number formatting from <_tty_make_name> to drivers
1723 +===============================================================================
1724 +Changes for patch v156
1726 +Work sponsored by SGI
1728 +- Fixed breakage in drivers/scsi/sd.c due to recent SCSI changes
1729 +===============================================================================
1730 +Changes for patch v157
1732 +Work sponsored by SGI
1734 +- Ported to kernel 2.3.45
1735 +===============================================================================
1736 +Changes for patch v158
1738 +Work sponsored by SGI
1740 +- Ported to kernel 2.3.46-pre2
1741 +===============================================================================
1742 +Changes for patch v159
1744 +Work sponsored by SGI
1746 +- Fixed drivers/block/md.c
1747 + Thanks to Mike Galbraith <mikeg@weiden.de>
1749 +- Documentation fixes
1751 +- Moved device registration from <lp_init> to <lp_register>
1752 + Thanks to Tim Waugh <twaugh@redhat.com>
1753 +===============================================================================
1754 +Changes for patch v160
1756 +Work sponsored by SGI
1758 +- Fixed drivers/char/joystick/joystick.c
1759 + Thanks to Vojtech Pavlik <vojtech@suse.cz>
1761 +- Documentation updates
1763 +- Fixed arch/i386/kernel/mtrr.c if procfs and devfs not enabled
1765 +- Fixed drivers/char/stallion.c
1766 +===============================================================================
1767 +Changes for patch v161
1769 +Work sponsored by SGI
1771 +- Remove /dev/ide when ide-mod is unloaded
1773 +- Fixed bug in drivers/block/ide-probe.c when secondary but no primary
1775 +- Added DEVFS_FL_NO_PERSISTENCE flag
1777 +- Used new DEVFS_FL_NO_PERSISTENCE flag for Unix98 pty slaves
1779 +- Removed unnecessary call to <update_devfs_inode_from_entry> in
1782 +- Only set auto-ownership for /dev/pty/s*
1783 +===============================================================================
1784 +Changes for patch v162
1786 +Work sponsored by SGI
1788 +- Set inode->i_size to correct size for symlinks
1789 + Thanks to Jeremy Fitzhardinge <jeremy@goop.org>
1791 +- Only give lookup() method to directories to comply with new VFS
1794 +- Remove unnecessary tests in symlink methods
1796 +- Don't kill existing block ops in <devfs_read_inode>
1798 +- Restore auto-ownership for /dev/pty/m*
1799 +===============================================================================
1800 +Changes for patch v163
1802 +Work sponsored by SGI
1804 +- Don't create missing directories in <devfs_find_handle>
1806 +- Removed Documentation/filesystems/devfs/mk-devlinks
1808 +- Updated Documentation/filesystems/devfs/README
1809 +===============================================================================
1810 +Changes for patch v164
1812 +Work sponsored by SGI
1814 +- Fixed CONFIG_DEVFS breakage in drivers/char/serial.c introduced in
1815 + linux-2.3.99-pre6-7
1816 +===============================================================================
1817 +Changes for patch v165
1819 +Work sponsored by SGI
1821 +- Ported to kernel 2.3.99-pre6
1822 +===============================================================================
1823 +Changes for patch v166
1825 +Work sponsored by SGI
1827 +- Added CONFIG_DEVFS_MOUNT
1828 +===============================================================================
1829 +Changes for patch v167
1831 +Work sponsored by SGI
1833 +- Updated Documentation/filesystems/devfs/README
1835 +- Updated sample modules.conf
1836 +===============================================================================
1837 +Changes for patch v168
1839 +Work sponsored by SGI
1841 +- Disabled multi-mount capability (use VFS bindings instead)
1843 +- Updated README from master HTML file
1844 +===============================================================================
1845 +Changes for patch v169
1847 +Work sponsored by SGI
1849 +- Removed multi-mount code
1851 +- Removed compatibility macros: VFS has changed too much
1852 +===============================================================================
1853 +Changes for patch v170
1855 +Work sponsored by SGI
1857 +- Updated README from master HTML file
1859 +- Merged devfs inode into devfs entry
1860 +===============================================================================
1861 +Changes for patch v171
1863 +Work sponsored by SGI
1865 +- Updated sample modules.conf
1867 +- Removed dead code in <devfs_register> which used to call
1870 +- Ported to kernel 2.4.0-test2-pre3
1871 +===============================================================================
1872 +Changes for patch v172
1874 +Work sponsored by SGI
1876 +- Changed interface to <devfs_register>
1878 +- Changed interface to <devfs_register_series>
1879 +===============================================================================
1880 +Changes for patch v173
1882 +Work sponsored by SGI
1884 +- Simplified interface to <devfs_mk_symlink>
1886 +- Simplified interface to <devfs_mk_dir>
1888 +- Simplified interface to <devfs_find_handle>
1889 +===============================================================================
1890 +Changes for patch v174
1892 +Work sponsored by SGI
1894 +- Updated README from master HTML file
1895 +===============================================================================
1896 +Changes for patch v175
1898 +Work sponsored by SGI
1900 +- DocBook update for fs/devfs/base.c
1901 + Thanks to Tim Waugh <twaugh@redhat.com>
1903 +- Removed stale fs/tunnel.c (was never used or completed)
1904 +===============================================================================
1905 +Changes for patch v176
1907 +Work sponsored by SGI
1909 +- Updated ToDo list
1911 +- Removed sample modules.conf: now distributed with devfsd
1913 +- Updated README from master HTML file
1915 +- Ported to kernel 2.4.0-test3-pre4 (which had devfs-patch-v174)
1916 +===============================================================================
1917 +Changes for patch v177
1919 +- Updated README from master HTML file
1921 +- Documentation cleanups
1923 +- Ensure <devfs_generate_path> terminates string for root entry
1924 + Thanks to Tim Jansen <tim@tjansen.de>
1926 +- Exported <devfs_get_name> to modules
1928 +- Make <devfs_mk_symlink> send events to devfsd
1930 +- Cleaned up option processing in <devfs_setup>
1932 +- Fixed bugs in handling symlinks: could leak or cause Oops
1934 +- Cleaned up directory handling by separating fops
1935 + Thanks to Alexander Viro <viro@parcelfarce.linux.theplanet.co.uk>
1936 +===============================================================================
1937 +Changes for patch v178
1939 +- Fixed handling of inverted options in <devfs_setup>
1940 +===============================================================================
1941 +Changes for patch v179
1943 +- Adjusted <try_modload> to account for <devfs_generate_path> fix
1944 +===============================================================================
1945 +Changes for patch v180
1947 +- Fixed !CONFIG_DEVFS_FS stub declaration of <devfs_get_info>
1948 +===============================================================================
1949 +Changes for patch v181
1951 +- Answered question posed by Al Viro and removed his comments from <devfs_open>
1953 +- Moved setting of registered flag after other fields are changed
1955 +- Fixed race between <devfsd_close> and <devfsd_notify_one>
1957 +- Global VFS changes added bogus BKL to devfsd_close(): removed
1959 +- Widened locking in <devfs_readlink> and <devfs_follow_link>
1961 +- Replaced <devfsd_read> stack usage with <devfsd_ioctl> kmalloc
1963 +- Simplified locking in <devfsd_ioctl> and fixed memory leak
1964 +===============================================================================
1965 +Changes for patch v182
1967 +- Created <devfs_*alloc_major> and <devfs_*alloc_devnum>
1969 +- Removed broken devnum allocation and use <devfs_alloc_devnum>
1971 +- Fixed old devnum leak by calling new <devfs_dealloc_devnum>
1973 +- Created <devfs_*alloc_unique_number>
1975 +- Fixed number leak for /dev/cdroms/cdrom%d
1977 +- Fixed number leak for /dev/discs/disc%d
1978 +===============================================================================
1979 +Changes for patch v183
1981 +- Fixed bug in <devfs_setup> which could hang boot process
1982 +===============================================================================
1983 +Changes for patch v184
1985 +- Documentation typo fix for fs/devfs/util.c
1987 +- Fixed drivers/char/stallion.c for devfs
1989 +- Added DEVFSD_NOTIFY_DELETE event
1991 +- Updated README from master HTML file
1993 +- Removed #include <asm/segment.h> from fs/devfs/base.c
1994 +===============================================================================
1995 +Changes for patch v185
1997 +- Made <block_semaphore> and <char_semaphore> in fs/devfs/util.c
2000 +- Fixed inode table races by removing it and using inode->u.generic_ip
2003 +- Moved <devfs_read_inode> into <get_vfs_inode>
2005 +- Moved <devfs_write_inode> into <devfs_notify_change>
2006 +===============================================================================
2007 +Changes for patch v186
2009 +- Fixed race in <devfs_do_symlink> for uni-processor
2011 +- Updated README from master HTML file
2012 +===============================================================================
2013 +Changes for patch v187
2015 +- Fixed drivers/char/stallion.c for devfs
2017 +- Fixed drivers/char/rocket.c for devfs
2019 +- Fixed bug in <devfs_alloc_unique_number>: limited to 128 numbers
2020 +===============================================================================
2021 +Changes for patch v188
2023 +- Updated major masks in fs/devfs/util.c up to Linus' "no new majors"
2024 + proclamation. Block: were 126 now 122 free, char: were 26 now 19 free
2026 +- Updated README from master HTML file
2028 +- Removed remnant of multi-mount support in <devfs_mknod>
2030 +- Removed unused DEVFS_FL_SHOW_UNREG flag
2031 +===============================================================================
2032 +Changes for patch v189
2034 +- Removed nlink field from struct devfs_inode
2036 +- Removed auto-ownership for /dev/pty/* (BSD ptys) and used
2037 + DEVFS_FL_CURRENT_OWNER|DEVFS_FL_NO_PERSISTENCE for /dev/pty/s* (just
2038 + like Unix98 pty slaves) and made /dev/pty/m* rw-rw-rw- access
2039 +===============================================================================
2040 +Changes for patch v190
2042 +- Updated README from master HTML file
2044 +- Replaced BKL with global rwsem to protect symlink data (quick and
2046 +===============================================================================
2047 +Changes for patch v191
2049 +- Replaced global rwsem for symlink with per-link refcount
2050 +===============================================================================
2051 +Changes for patch v192
2053 +- Removed unnecessary #ifdef CONFIG_DEVFS_FS from arch/i386/kernel/mtrr.c
2055 +- Ported to kernel 2.4.10-pre11
2057 +- Set inode->i_mapping->a_ops for block nodes in <get_vfs_inode>
2058 +===============================================================================
2059 +Changes for patch v193
2061 +- Went back to global rwsem for symlinks (refcount scheme no good)
2062 +===============================================================================
2063 +Changes for patch v194
2065 +- Fixed overrun in <devfs_link> by removing function (not needed)
2067 +- Updated README from master HTML file
2068 +===============================================================================
2069 +Changes for patch v195
2071 +- Fixed buffer underrun in <try_modload>
2073 +- Moved down_read() from <search_for_entry_in_dir> to <find_entry>
2074 +===============================================================================
2075 +Changes for patch v196
2077 +- Fixed race in <devfsd_ioctl> when setting event mask
2078 + Thanks to Kari Hurtta <hurtta@leija.mh.fmi.fi>
2080 +- Avoid deadlock in <devfs_follow_link> by using temporary buffer
2081 +===============================================================================
2082 +Changes for patch v197
2084 +- First release of new locking code for devfs core (v1.0)
2086 +- Fixed bug in drivers/cdrom/cdrom.c
2087 +===============================================================================
2088 +Changes for patch v198
2090 +- Discard temporary buffer, now use "%s" for dentry names
2092 +- Don't generate path in <try_modload>: use fake entry instead
2094 +- Use "existing" directory in <_devfs_make_parent_for_leaf>
2096 +- Use slab cache rather than fixed buffer for devfsd events
2097 +===============================================================================
2098 +Changes for patch v199
2100 +- Removed obsolete usage of DEVFS_FL_NO_PERSISTENCE
2102 +- Send DEVFSD_NOTIFY_REGISTERED events in <devfs_mk_dir>
2104 +- Fixed locking bug in <devfs_d_revalidate_wait> due to typo
2106 +- Do not send CREATE, CHANGE, ASYNC_OPEN or DELETE events from devfsd
2108 +===============================================================================
2109 +Changes for patch v200
2111 +- Ported to kernel 2.5.1-pre2
2112 +===============================================================================
2113 +Changes for patch v201
2115 +- Fixed bug in <devfsd_read>: was dereferencing freed pointer
2116 +===============================================================================
2117 +Changes for patch v202
2119 +- Fixed bug in <devfsd_close>: was dereferencing freed pointer
2121 +- Added process group check for devfsd privileges
2122 +===============================================================================
2123 +Changes for patch v203
2125 +- Use SLAB_ATOMIC in <devfsd_notify_de> from <devfs_d_delete>
2126 +===============================================================================
2127 +Changes for patch v204
2129 +- Removed long obsolete rc.devfs
2131 +- Return old entry in <devfs_mk_dir> for 2.4.x kernels
2133 +- Updated README from master HTML file
2135 +- Increment refcount on module in <check_disc_changed>
2137 +- Created <devfs_get_handle> and exported <devfs_put>
2139 +- Increment refcount on module in <devfs_get_ops>
2141 +- Created <devfs_put_ops> and used where needed to fix races
2143 +- Added clarifying comments in response to preliminary EMC code review
2145 +- Added poisoning to <devfs_put>
2147 +- Improved debugging messages
2149 +- Fixed unregister bugs in drivers/md/lvm-fs.c
2150 +===============================================================================
2151 +Changes for patch v205
2153 +- Corrected (made useful) debugging message in <unregister>
2155 +- Moved <kmem_cache_create> in <mount_devfs_fs> to <init_devfs_fs>
2157 +- Fixed drivers/md/lvm-fs.c to create "lvm" entry
2159 +- Added magic number to guard against scribbling drivers
2161 +- Only return old entry in <devfs_mk_dir> if a directory
2163 +- Defined macros for error and debug messages
2165 +- Updated README from master HTML file
2166 +===============================================================================
2167 +Changes for patch v206
2169 +- Added support for multiple Compaq cpqarray controllers
2171 +- Fixed (rare, old) race in <devfs_lookup>
2172 +===============================================================================
2173 +Changes for patch v207
2175 +- Fixed deadlock bug in <devfs_d_revalidate_wait>
2177 +- Tag VFS deletable in <devfs_mk_symlink> if handle ignored
2179 +- Updated README from master HTML file
2180 +===============================================================================
2181 +Changes for patch v208
2183 +- Added KERN_* to remaining messages
2185 +- Cleaned up declaration of <stat_read>
2187 +- Updated README from master HTML file
2188 +===============================================================================
2189 +Changes for patch v209
2191 +- Updated README from master HTML file
2193 +- Removed silently introduced calls to lock_kernel() and
2194 + unlock_kernel() due to recent VFS locking changes. BKL isn't
2197 +- Changed <devfs_rmdir> to allow later additions if not yet empty
2199 +- Added calls to <devfs_register_partitions> in drivers/block/blkpc.c
2200 + <add_partition> and <del_partition>
2202 +- Fixed bug in <devfs_alloc_unique_number>: was clearing beyond
2205 +- Fixed bitfield data type for <devfs_*alloc_devnum>
2207 +- Made major bitfield type and initialiser 64 bit safe
2208 +===============================================================================
2209 +Changes for patch v210
2211 +- Updated fs/devfs/util.c to fix shift warning on 64 bit machines
2212 + Thanks to Anton Blanchard <anton@samba.org>
2214 +- Updated README from master HTML file
2215 +===============================================================================
2216 +Changes for patch v211
2218 +- Do not put miscellaneous character devices in /dev/misc if they
2219 + specify their own directory (i.e. contain a '/' character)
2221 +- Copied macro for error messages from fs/devfs/base.c to
2222 + fs/devfs/util.c and made use of this macro
2224 +- Removed 2.4.x compatibility code from fs/devfs/base.c
2225 +===============================================================================
2226 +Changes for patch v212
2228 +- Added BKL to <devfs_open> because drivers still need it
2229 +===============================================================================
2230 +Changes for patch v213
2232 +- Protected <scan_dir_for_removable> and <get_removable_partition>
2233 + from changing directory contents
2234 +===============================================================================
2235 +Changes for patch v214
2237 +- Switched to ISO C structure field initialisers
2239 +- Switch to set_current_state() and move before add_wait_queue()
2241 +- Updated README from master HTML file
2243 +- Fixed devfs entry leak in <devfs_readdir> when *readdir fails
2244 +===============================================================================
2245 +Changes for patch v215
2247 +- Created <devfs_find_and_unregister>
2249 +- Switched many functions from <devfs_find_handle> to
2250 + <devfs_find_and_unregister>
2252 +- Switched many functions from <devfs_find_handle> to <devfs_get_handle>
2253 +===============================================================================
2254 +Changes for patch v216
2256 +- Switched arch/ia64/sn/io/hcl.c from <devfs_find_handle> to
2257 + <devfs_get_handle>
2259 +- Removed deprecated <devfs_find_handle>
2260 +===============================================================================
2261 +Changes for patch v217
2263 +- Exported <devfs_find_and_unregister> and <devfs_only> to modules
2265 +- Updated README from master HTML file
2267 +- Fixed module unload race in <devfs_open>
2268 +===============================================================================
2269 +Changes for patch v218
2271 +- Removed DEVFS_FL_AUTO_OWNER flag
2273 +- Switched lingering structure field initialiser to ISO C
2275 +- Added locking when setting/clearing flags
2277 +- Documentation fix in fs/devfs/util.c
2278 diff -urN linux-2.6.19.old/Documentation/filesystems/devfs/README linux-2.6.19.dev/Documentation/filesystems/devfs/README
2279 --- linux-2.6.19.old/Documentation/filesystems/devfs/README 1970-01-01 01:00:00.000000000 +0100
2280 +++ linux-2.6.19.dev/Documentation/filesystems/devfs/README 2006-12-14 03:12:59.000000000 +0100
2282 +Devfs (Device File System) FAQ
2285 +Linux Devfs (Device File System) FAQ
2290 +Document languages:
2298 +-----------------------------------------------------------------------------
2300 +NOTE: the master copy of this document is available online at:
2302 +http://www.atnf.csiro.au/~rgooch/linux/docs/devfs.html
2303 +and looks much better than the text version distributed with the
2304 +kernel sources. A mirror site is available at:
2306 +http://www.ras.ucalgary.ca/~rgooch/linux/docs/devfs.html
2308 +There is also an optional daemon that may be used with devfs. You can
2309 +find out more about it at:
2311 +http://www.atnf.csiro.au/~rgooch/linux/
2313 +A mailing list is available which you may subscribe to. Send
2315 +to majordomo@oss.sgi.com with the following line in the
2316 +body of the message:
2318 +To unsubscribe, send the message body:
2320 +instead. The list is archived at
2322 +http://oss.sgi.com/projects/devfs/archive/.
2324 +-----------------------------------------------------------------------------
2337 +Operational issues (essential reading)
2339 +Instructions for the impatient
2340 +Permissions persistence across reboots
2341 +Dealing with drivers without devfs support
2342 +All the way with Devfs
2344 +Kernel Naming Scheme
2345 +Devfsd Naming Scheme
2346 +Old Compatibility Names
2347 +SCSI Host Probing Issues
2351 +Device drivers currently ported
2353 +Allocation of Device Numbers
2355 +Questions and Answers
2358 +Alternatives to devfs
2359 +What I don't like about devfs
2361 +Strange kernel messages
2362 +Compilation problems with devfsd
2367 +Translations of this document
2370 +-----------------------------------------------------------------------------
2375 +Devfs is an alternative to "real" character and block special devices
2376 +on your root filesystem. Kernel device drivers can register devices by
2377 +name rather than major and minor numbers. These devices will appear in
2378 +devfs automatically, with whatever default ownership and
2379 +protection the driver specified. A daemon (devfsd) can be used to
2380 +override these defaults. Devfs has been in the kernel since 2.3.46.
2382 +NOTE that devfs is entirely optional. If you prefer the old
2383 +disc-based device nodes, then simply leave CONFIG_DEVFS_FS=n (the
2384 +default). In this case, nothing will change. ALSO NOTE that if you do
2385 +enable devfs, the defaults are such that full compatibility is
2386 +maintained with the old devices names.
2388 +There are two aspects to devfs: one is the underlying device
2389 +namespace, which is a namespace just like any mounted filesystem. The
2390 +other aspect is the filesystem code which provides a view of the
2391 +device namespace. The reason I make a distinction is because devfs
2392 +can be mounted many times, with each mount showing the same device
2393 +namespace. Changes made are global to all mounted devfs filesystems.
2394 +Also, because the devfs namespace exists without any devfs mounts, you
2395 +can easily mount the root filesystem by referring to an entry in the
2399 +The cost of devfs is a small increase in kernel code size and memory
2400 +usage. About 7 pages of code (some of that in __init sections) and 72
2401 +bytes for each entry in the namespace. A modest system has only a
2402 +couple of hundred device entries, so this costs a few more
2403 +pages. Compare this with the suggestion to put /dev on a <a
2404 +href="#why-faq-ramdisc">ramdisc.
2406 +On a typical machine, the cost is under 0.2 percent. On a modest
2407 +system with 64 MBytes of RAM, the cost is under 0.1 percent. The
2408 +accusations of "bloatware" levelled at devfs are not justified.
2410 +-----------------------------------------------------------------------------
2415 +There are several problems that devfs addresses. Some of these
2416 +problems are more serious than others (depending on your point of
2417 +view), and some can be solved without devfs. However, the totality of
2418 +these problems really calls out for devfs.
2420 +The choice is a patchwork of inefficient user space solutions, which
2421 +are complex and likely to be fragile, or to use a simple and efficient
2422 +devfs which is robust.
2424 +There have been many counter-proposals to devfs, all seeking to
2425 +provide some of the benefits without actually implementing devfs. So
2426 +far there has been an absence of code and no proposed alternative has
2427 +been able to provide all the features that devfs does. Further,
2428 +alternative proposals require far more complexity in user-space (and
2429 +still deliver less functionality than devfs). Some people have the
2430 +mantra of reducing "kernel bloat", but don't consider the effects on
2433 +A good solution limits the total complexity of kernel-space and
2437 +Major&minor allocation
2439 +The existing scheme requires the allocation of major and minor device
2440 +numbers for each and every device. This means that a central
2441 +co-ordinating authority is required to issue these device numbers
2442 +(unless you're developing a "private" device driver), in order to
2443 +preserve uniqueness. Devfs shifts the burden to a namespace. This may
2444 +not seem like a huge benefit, but actually it is. Since driver authors
2445 +will naturally choose a device name which reflects the functionality
2446 +of the device, there is far less potential for namespace conflict.
2447 +Solving this requires a kernel change.
2451 +Because you currently access devices through device nodes, these must
2452 +be created by the system administrator. For standard devices you can
2453 +usually find a MAKEDEV programme which creates all these (hundreds!)
2454 +of nodes. This means that changes in the kernel must be reflected by
2455 +changes in the MAKEDEV programme, or else the system administrator
2456 +creates device nodes by hand.
2458 +The basic problem is that there are two separate databases of
2459 +major and minor numbers. One is in the kernel and one is in /dev (or
2460 +in a MAKEDEV programme, if you want to look at it that way). This is
2461 +duplication of information, which is not good practice.
2462 +Solving this requires a kernel change.
2466 +A typical /dev has over 1200 nodes! Most of these devices simply don't
2467 +exist because the hardware is not available. A huge /dev increases the
2468 +time to access devices (I'm just referring to the dentry lookup times
2469 +and the time taken to read inodes off disc: the next subsection shows
2470 +some more horrors).
2472 +An example of how big /dev can grow is if we consider SCSI devices:
2474 +host 6 bits (say up to 64 hosts on a really big machine)
2475 +channel 4 bits (say up to 16 SCSI buses per host)
2482 +This requires 8 Mega (1024*1024) inodes if we want to store all
2483 +possible device nodes. Even if we scrap everything but id,partition
2484 +and assume a single host adapter with a single SCSI bus and only one
2485 +logical unit per SCSI target (id), that's still 10 bits or 1024
2486 +inodes. Each VFS inode takes around 256 bytes (kernel 2.1.78), so
2487 +that's 256 kBytes of inode storage on disc (assuming real inodes take
2488 +a similar amount of space as VFS inodes). This is actually not so bad,
2489 +because disc is cheap these days. Embedded systems would care about
2490 +256 kBytes of /dev inodes, but you could argue that embedded systems
2491 +would have hand-tuned /dev directories. I've had to do just that on my
2492 +embedded systems, but I would rather just leave it to devfs.
2494 +Another issue is the time taken to lookup an inode when first
2495 +referenced. Not only does this take time in scanning through a list in
2496 +memory, but also the seek times to read the inodes off disc.
2497 +This could be solved in user-space using a clever programme which
2498 +scanned the kernel logs and deleted /dev entries which are not
2499 +available and created them when they were available. This programme
2500 +would need to be run every time a new module was loaded, which would
2501 +slow things down a lot.
2503 +There is an existing programme called scsidev which will automatically
2504 +create device nodes for SCSI devices. It can do this by scanning files
2505 +in /proc/scsi. Unfortunately, to extend this idea to other device
2506 +nodes would require significant modifications to existing drivers (so
2507 +they too would provide information in /proc). This is a non-trivial
2508 +change (I should know: devfs has had to do something similar). Once
2509 +you go to this much effort, you may as well use devfs itself (which
2510 +also provides this information). Furthermore, such a system would
2511 +likely be implemented in an ad-hoc fashion, as different drivers will
2512 +provide their information in different ways.
2514 +Devfs is much cleaner, because it (naturally) has a uniform mechanism
2515 +to provide this information: the device nodes themselves!
2518 +Node to driver file_operations translation
2520 +There is an important difference between the way disc-based character
2521 +and block nodes and devfs entries make the connection between an entry
2522 +in /dev and the actual device driver.
2524 +With the current 8 bit major and minor numbers the connection between
2525 +disc-based c&b nodes and per-major drivers is done through a
2526 +fixed-length table of 128 entries. The various filesystem types set
2527 +the inode operations for c&b nodes to {chr,blk}dev_inode_operations,
2528 +so when a device is opened a few quick levels of indirection bring us
2529 +to the driver file_operations.
2531 +For miscellaneous character devices a second step is required: there
2532 +is a scan for the driver entry with the same minor number as the file
2533 +that was opened, and the appropriate minor open method is called. This
2534 +scanning is done *every time* you open a device node. Potentially, you
2535 +may be searching through dozens of misc. entries before you find your
2536 +open method. While not an enormous performance overhead, this does
2539 +Linux *must* move beyond the 8 bit major and minor barrier,
2540 +somehow. If we simply increase each to 16 bits, then the indexing
2541 +scheme used for major driver lookup becomes untenable, because the
2542 +major tables (one each for character and block devices) would need to
2543 +be 64 k entries long (512 kBytes on x86, 1 MByte for 64 bit
2544 +systems). So we would have to use a scheme like that used for
2545 +miscellaneous character devices, which means the search time goes up
2546 +linearly with the average number of major device drivers on your
2547 +system. Not all "devices" are hardware, some are higher-level drivers
2548 +like KGI, so you can get more "devices" without adding hardware
2549 +You can improve this by creating an ordered (balanced:-)
2550 +binary tree, in which case your search time becomes log(N).
2551 +Alternatively, you can use hashing to speed up the search.
2552 +But why do that search at all if you don't have to? Once again, it
2555 +Note that devfs doesn't use the major&minor system. For devfs
2556 +entries, the connection is done when you lookup the /dev entry. When
2557 +devfs_register() is called, an internal table is appended which has
2558 +the entry name and the file_operations. If the dentry cache doesn't
2559 +have the /dev entry already, this internal table is scanned to get the
2560 +file_operations, and an inode is created. If the dentry cache already
2561 +has the entry, there is *no lookup time* (other than the dentry scan
2562 +itself, but we can't avoid that anyway, and besides Linux dentries
2563 +cream other OS's which don't have them:-). Furthermore, the number of
2564 +node entries in a devfs is only the number of available device
2565 +entries, not the number of *conceivable* entries. Even if you remove
2566 +unnecessary entries in a disc-based /dev, the number of conceivable
2567 +entries remains the same: you just limit yourself in order to save
2570 +Devfs provides a fast connection between a VFS node and the device
2571 +driver, in a scalable way.
2573 +/dev as a system administration tool
2575 +Right now /dev contains a list of conceivable devices, most of which I
2576 +don't have. Devfs only shows those devices available on my
2577 +system. This means that listing /dev is a handy way of checking what
2578 +devices are available.
2582 +Existing major and minor numbers are limited to 8 bits each. This is
2583 +now a limiting factor for some drivers, particularly the SCSI disc
2584 +driver, which consumes a single major number. Only 16 discs are
2585 +supported, and each disc may have only 15 partitions. Maybe this isn't
2586 +a problem for you, but some of us are building huge Linux systems with
2587 +disc arrays. With devfs an arbitrary pointer can be associated with
2588 +each device entry, which can be used to give an effective 32 bit
2589 +device identifier (i.e. that's like having a 32 bit minor
2590 +number). Since this is private to the kernel, there are no C library
2591 +compatibility issues which you would have with increasing major and
2592 +minor number sizes. See the section on "Allocation of Device Numbers"
2593 +for details on maintaining compatibility with userspace.
2595 +Solving this requires a kernel change.
2597 +Since writing this, the kernel has been modified so that the SCSI disc
2598 +driver has more major numbers allocated to it and now supports up to
2599 +128 discs. Since these major numbers are non-contiguous (a result of
2600 +unplanned expansion), the implementation is a little more cumbersome
2603 +Just like the changes to IPv4 to fix impending limitations in the
2604 +address space, people find ways around the limitations. In the long
2605 +run, however, solutions like IPv6 or devfs can't be put off forever.
2607 +Read-only root filesystem
2609 +Having your device nodes on the root filesystem means that you can't
2610 +operate properly with a read-only root filesystem. This is because you
2611 +want to change ownerships and protections of tty devices. Existing
2612 +practice prevents you using a CD-ROM as your root filesystem for a
2613 +*real* system. Sure, you can boot off a CD-ROM, but you can't change
2614 +tty ownerships, so it's only good for installing.
2616 +Also, you can't use a shared NFS root filesystem for a cluster of
2617 +discless Linux machines (having tty ownerships changed on a common
2618 +/dev is not good). Nor can you embed your root filesystem in a
2621 +You can get around this by creating a RAMDISC at boot time, making
2622 +an ext2 filesystem in it, mounting it somewhere and copying the
2623 +contents of /dev into it, then unmounting it and mounting it over
2626 +A devfs is a cleaner way of solving this.
2628 +Non-Unix root filesystem
2630 +Non-Unix filesystems (such as NTFS) can't be used for a root
2631 +filesystem because they variously don't support character and block
2632 +special files or symbolic links. You can't have a separate disc-based
2633 +or RAMDISC-based filesystem mounted on /dev because you need device
2634 +nodes before you can mount these. Devfs can be mounted without any
2635 +device nodes. Devlinks won't work because symlinks aren't supported.
2636 +An alternative solution is to use initrd to mount a RAMDISC initial
2637 +root filesystem (which is populated with a minimal set of device
2638 +nodes), and then construct a new /dev in another RAMDISC, and finally
2639 +switch to your non-Unix root filesystem. This requires clever boot
2640 +scripts and a fragile and conceptually complex boot procedure.
2642 +Devfs solves this in a robust and conceptually simple way.
2646 +Current pseudo-tty (pty) devices are owned by root and read-writable
2647 +by everyone. The user of a pty-pair cannot change
2648 +ownership/protections without being suid-root.
2650 +This could be solved with a secure user-space daemon which runs as
2651 +root and does the actual creation of pty-pairs. Such a daemon would
2652 +require modification to *every* programme that wants to use this new
2653 +mechanism. It also slows down creation of pty-pairs.
2655 +An alternative is to create a new open_pty() syscall which does much
2656 +the same thing as the user-space daemon. Once again, this requires
2657 +modifications to pty-handling programmes.
2659 +The devfs solution allows a device driver to "tag" certain device
2660 +files so that when an unopened device is opened, the ownerships are
2661 +changed to the current euid and egid of the opening process, and the
2662 +protections are changed to the default registered by the driver. When
2663 +the device is closed ownership is set back to root and protections are
2664 +set back to read-write for everybody. No programme need be changed.
2665 +The devpts filesystem provides this auto-ownership feature for Unix98
2666 +ptys. It doesn't support old-style pty devices, nor does it have all
2667 +the other features of devfs.
2669 +Intelligent device management
2671 +Devfs implements a simple yet powerful protocol for communication with
2672 +a device management daemon (devfsd) which runs in user space. It is
2673 +possible to send a message (either synchronously or asynchronously) to
2674 +devfsd on any event, such as registration/unregistration of device
2675 +entries, opening and closing devices, looking up inodes, scanning
2676 +directories and more. This has many possibilities. Some of these are
2677 +already implemented. See:
2680 +http://www.atnf.csiro.au/~rgooch/linux/
2682 +Device entry registration events can be used by devfsd to change
2683 +permissions of newly-created device nodes. This is one mechanism to
2684 +control device permissions.
2686 +Device entry registration/unregistration events can be used to run
2687 +programmes or scripts. This can be used to provide automatic mounting
2688 +of filesystems when a new block device media is inserted into the
2691 +Asynchronous device open and close events can be used to implement
2692 +clever permissions management. For example, the default permissions on
2693 +/dev/dsp do not allow everybody to read from the device. This is
2694 +sensible, as you don't want some remote user recording what you say at
2695 +your console. However, the console user is also prevented from
2696 +recording. This behaviour is not desirable. With asynchronous device
2697 +open and close events, you can have devfsd run a programme or script
2698 +when console devices are opened to change the ownerships for *other*
2699 +device nodes (such as /dev/dsp). On closure, you can run a different
2700 +script to restore permissions. An advantage of this scheme over
2701 +modifying the C library tty handling is that this works even if your
2702 +programme crashes (how many times have you seen the utmp database with
2703 +lingering entries for non-existent logins?).
2705 +Synchronous device open events can be used to perform intelligent
2706 +device access protections. Before the device driver open() method is
2707 +called, the daemon must first validate the open attempt, by running an
2708 +external programme or script. This is far more flexible than access
2709 +control lists, as access can be determined on the basis of other
2710 +system conditions instead of just the UID and GID.
2712 +Inode lookup events can be used to authenticate module autoload
2713 +requests. Instead of using kmod directly, the event is sent to
2714 +devfsd which can implement an arbitrary authentication before loading
2717 +Inode lookup events can also be used to construct arbitrary
2718 +namespaces, without having to resort to populating devfs with symlinks
2719 +to devices that don't exist.
2721 +Speculative Device Scanning
2723 +Consider an application (like cdparanoia) that wants to find all
2724 +CD-ROM devices on the system (SCSI, IDE and other types), whether or
2725 +not their respective modules are loaded. The application must
2726 +speculatively open certain device nodes (such as /dev/sr0 for the SCSI
2727 +CD-ROMs) in order to make sure the module is loaded. This requires
2728 +that all Linux distributions follow the standard device naming scheme
2729 +(last time I looked RedHat did things differently). Devfs solves the
2732 +The same application also wants to see which devices are actually
2733 +available on the system. With the existing system it needs to read the
2734 +/dev directory and speculatively open each /dev/sr* device to
2735 +determine if the device exists or not. With a large /dev this is an
2736 +inefficient operation, especially if there are many /dev/sr* nodes. A
2737 +solution like scsidev could reduce the number of /dev/sr* entries (but
2738 +of course that also requires all that inefficient directory scanning).
2740 +With devfs, the application can open the /dev/sr directory
2741 +(which triggers the module autoloading if required), and proceed to
2742 +read /dev/sr. Since only the available devices will have
2743 +entries, there are no inefficencies in directory scanning or device
2746 +-----------------------------------------------------------------------------
2750 +FreeBSD has a devfs implementation. Solaris and AIX each have a
2751 +pseudo-devfs (something akin to scsidev but for all devices, with some
2752 +unspecified kernel support). BeOS, Plan9 and QNX also have it. SGI's
2753 +IRIX 6.4 and above also have a device filesystem.
2755 +While we shouldn't just automatically do something because others do
2756 +it, we should not ignore the work of others either. FreeBSD has a lot
2757 +of competent people working on it, so their opinion should not be
2760 +-----------------------------------------------------------------------------
2765 +Registering device entries
2767 +For every entry (device node) in a devfs-based /dev a driver must call
2768 +devfs_register(). This adds the name of the device entry, the
2769 +file_operations structure pointer and a few other things to an
2770 +internal table. Device entries may be added and removed at any
2771 +time. When a device entry is registered, it automagically appears in
2772 +any mounted devfs'.
2776 +When a lookup operation on an entry is performed and if there is no
2777 +driver information for that entry devfs will attempt to call
2778 +devfsd. If still no driver information can be found then a negative
2779 +dentry is yielded and the next stage operation will be called by the
2780 +VFS (such as create() or mknod() inode methods). If driver information
2781 +can be found, an inode is created (if one does not exist already) and
2784 +Manually creating device nodes
2786 +The mknod() method allows you to create an ordinary named pipe in the
2787 +devfs, or you can create a character or block special inode if one
2788 +does not already exist. You may wish to create a character or block
2789 +special inode so that you can set permissions and ownership. Later, if
2790 +a device driver registers an entry with the same name, the
2791 +permissions, ownership and times are retained. This is how you can set
2792 +the protections on a device even before the driver is loaded. Once you
2793 +create an inode it appears in the directory listing.
2795 +Unregistering device entries
2797 +A device driver calls devfs_unregister() to unregister an entry.
2803 +The semantics of inode creation are different when devfs is mounted
2804 +with the "explicit" option. Now, when a device entry is registered, it
2805 +will not appear until you use mknod() to create the device. It doesn't
2806 +matter if you mknod() before or after the device is registered with
2807 +devfs_register(). The purpose of this behaviour is to support
2808 +chroot(2) gaols, where you want to mount a minimal devfs inside the
2809 +gaol. Only the devices you specifically want to be available (through
2810 +your mknod() setup) will be accessible.
2814 +As of kernel 2.3.99, the VFS has had the ability to rebind parts of
2815 +the global filesystem namespace into another part of the namespace.
2816 +This now works even at the leaf-node level, which means that
2817 +individual files and device nodes may be bound into other parts of the
2818 +namespace. This is like making links, but better, because it works
2819 +across filesystems (unlike hard links) and works through chroot()
2820 +gaols (unlike symbolic links).
2822 +Because of these improvements to the VFS, the multi-mount capability
2823 +in devfs is no longer needed. The administrator may create a minimal
2824 +device tree inside a chroot(2) gaol by using VFS bindings. As this
2825 +provides most of the features of the devfs multi-mount capability, I
2826 +removed the multi-mount support code (after issuing an RFC). This
2827 +yielded code size reductions and simplifications.
2829 +If you want to construct a minimal chroot() gaol, the following
2830 +command should suffice:
2832 +mount --bind /dev/null /gaol/dev/null
2835 +Repeat for other device nodes you want to expose. Simple!
2837 +-----------------------------------------------------------------------------
2843 +Instructions for the impatient
2845 +Nobody likes reading documentation. People just want to get in there
2846 +and play. So this section tells you quickly the steps you need to take
2847 +to run with devfs mounted over /dev. Skip these steps and you will end
2848 +up with a nearly unbootable system. Subsequent sections describe the
2849 +issues in more detail, and discuss non-essential configuration
2853 +OK, if you're reading this, I assume you want to play with
2854 +devfs. First you should ensure that /usr/src/linux contains a
2855 +recent kernel source tree. Then you need to compile devfsd, the device
2856 +management daemon, available at
2858 +http://www.atnf.csiro.au/~rgooch/linux/.
2859 +Because the kernel has a naming scheme
2860 +which is quite different from the old naming scheme, you need to
2861 +install devfsd so that software and configuration files that use the
2862 +old naming scheme will not break.
2864 +Compile and install devfsd. You will be provided with a default
2865 +configuration file /etc/devfsd.conf which will provide
2866 +compatibility symlinks for the old naming scheme. Don't change this
2867 +config file unless you know what you're doing. Even if you think you
2868 +do know what you're doing, don't change it until you've followed all
2869 +the steps below and booted a devfs-enabled system and verified that it
2872 +Now edit your main system boot script so that devfsd is started at the
2873 +very beginning (before any filesystem
2874 +checks). /etc/rc.d/rc.sysinit is often the main boot script
2875 +on systems with SysV-style boot scripts. On systems with BSD-style
2876 +boot scripts it is often /etc/rc. Also check
2879 +NOTE that the line you put into the boot
2880 +script should be exactly:
2884 +DO NOT use some special daemon-launching
2885 +programme, otherwise the boot script may not wait for devfsd to finish
2889 +There may still be some problems because of broken software making
2890 +assumptions about device names. In particular, some software does not
2891 +handle devices which are symbolic links. If you are running a libc 5
2892 +based system, install libc 5.4.44 (if you have libc 5.4.46, go back to
2893 +libc 5.4.44, which is actually correct). If you are running a glibc
2894 +based system, make sure you have glibc 2.1.3 or later.
2897 +PAM (Pluggable Authentication Modules) is supposed to be a flexible
2898 +mechanism for providing better user authentication and access to
2899 +services. Unfortunately, it's also fragile, complex and undocumented
2900 +(check out RedHat 6.1, and probably other distributions as well). PAM
2901 +has problems with symbolic links. Append the following lines to your
2902 +/etc/securetty file:
2913 +This will not weaken security. If you have a version of util-linux
2914 +earlier than 2.10.h, please upgrade to 2.10.h or later. If you
2915 +absolutely cannot upgrade, then also append the following lines to
2916 +your /etc/securetty file:
2927 +This may potentially weaken security by allowing root logins over the
2928 +network (a password is still required, though). However, since there
2929 +are problems with dealing with symlinks, I'm suspicious of the level
2930 +of security offered in any case.
2933 +While not essential, it's probably a good idea to upgrade to XFree86
2934 +4.0, as patches went in to make it more devfs-friendly. If you don't,
2935 +you'll probably need to apply the following patch to
2936 +/etc/security/console.perms so that ordinary users can run
2937 +startx. Note that not all distributions have this file (e.g. Debian),
2938 +so if it's not present, don't worry about it.
2940 +--- /etc/security/console.perms.orig Sat Apr 17 16:26:47 1999
2941 ++++ /etc/security/console.perms Fri Feb 25 23:53:55 2000
2943 + # man 5 console.perms
2945 + # file classes -- these are regular expressions
2946 +-<console>=tty[0-9][0-9]* :[0-9]\.[0-9] :[0-9]
2947 ++<console>=tty[0-9][0-9]* vc/[0-9][0-9]* :[0-9]\.[0-9] :[0-9]
2949 + # device classes -- these are shell-style globs
2950 + <floppy>=/dev/fd[0-1]*
2952 +If the patch does not apply, then change the line:
2954 +<console>=tty[0-9][0-9]* :[0-9]\.[0-9] :[0-9]
2958 +<console>=tty[0-9][0-9]* vc/[0-9][0-9]* :[0-9]\.[0-9] :[0-9]
2962 +I've had a report of devpts mounted on /dev/pts not working
2963 +correctly. Since devfs will also manage /dev/pts, there is no
2964 +need to mount devpts as well. You should either edit your
2965 +/etc/fstab so devpts is not mounted, or disable devpts from
2966 +your kernel configuration.
2968 +Unsupported drivers
2969 +Not all drivers have devfs support. If you depend on one of these
2970 +drivers, you will need to create a script or tarfile that you can use
2971 +at boot time to create device nodes as appropriate. There is a
2972 +section which describes this. Another
2973 +section lists the drivers which have
2978 +Many disributions configure /dev/mouse to be the mouse device
2979 +for XFree86 and GPM. I actually think this is a bad idea, because it
2980 +adds another level of indirection. When looking at a config file, if
2981 +you see /dev/mouse you're left wondering which mouse
2982 +is being referred to. Hence I recommend putting the actual mouse
2983 +device (for example /dev/psaux) into your
2984 +/etc/X11/XF86Config file (and similarly for the GPM
2985 +configuration file).
2987 +Alternatively, use the same technique used for unsupported drivers
2991 +Finally, you need to make sure devfs is compiled into your kernel. Set
2992 +CONFIG_EXPERIMENTAL=y, CONFIG_DEVFS_FS=y and CONFIG_DEVFS_MOUNT=y by
2993 +using favourite configuration tool (i.e. make config or
2994 +make xconfig) and then make clean and then recompile your kernel and
2995 +modules. At boot, devfs will be mounted onto /dev.
2997 +If you encounter problems booting (for example if you forgot a
2998 +configuration step), you can pass devfs=nomount at the kernel
2999 +boot command line. This will prevent the kernel from mounting devfs at
3000 +boot time onto /dev.
3002 +In general, a kernel built with CONFIG_DEVFS_FS=y but without mounting
3003 +devfs onto /dev is completely safe, and requires no
3004 +configuration changes. One exception to take note of is when
3005 +LABEL= directives are used in /etc/fstab. In this
3006 +case you will be unable to boot properly. This is because the
3007 +mount(8) programme uses /proc/partitions as part of
3008 +the volume label search process, and the device names it finds are not
3009 +available, because setting CONFIG_DEVFS_FS=y changes the names in
3010 +/proc/partitions, irrespective of whether devfs is mounted.
3012 +Now you've finished all the steps required. You're now ready to boot
3013 +your shiny new kernel. Enjoy.
3015 +Changing the configuration
3017 +OK, you've now booted a devfs-enabled system, and everything works.
3018 +Now you may feel like changing the configuration (common targets are
3019 +/etc/fstab and /etc/devfsd.conf). Since you have a
3020 +system that works, if you make any changes and it doesn't work, you
3021 +now know that you only have to restore your configuration files to the
3022 +default and it will work again.
3025 +Permissions persistence across reboots
3027 +If you don't use mknod(2) to create a device file, nor use chmod(2) or
3028 +chown(2) to change the ownerships/permissions, the inode ctime will
3029 +remain at 0 (the epoch, 12 am, 1-JAN-1970, GMT). Anything with a ctime
3030 +later than this has had it's ownership/permissions changed. Hence, a
3031 +simple script or programme may be used to tar up all changed inodes,
3032 +prior to shutdown. Although effective, many consider this approach a
3035 +A much better approach is to use devfsd to save and restore
3036 +permissions. It may be configured to record changes in permissions and
3037 +will save them in a database (in fact a directory tree), and restore
3038 +these upon boot. This is an efficient method and results in immediate
3039 +saving of current permissions (unlike the tar approach, which saves
3040 +permissions at some unspecified future time).
3042 +The default configuration file supplied with devfsd has config entries
3043 +which you may uncomment to enable persistence management.
3045 +If you decide to use the tar approach anyway, be aware that tar will
3046 +first unlink(2) an inode before creating a new device node. The
3047 +unlink(2) has the effect of breaking the connection between a devfs
3048 +entry and the device driver. If you use the "devfs=only" boot option,
3049 +you lose access to the device driver, requiring you to reload the
3050 +module. I consider this a bug in tar (there is no real need to
3051 +unlink(2) the inode first).
3053 +Alternatively, you can use devfsd to provide more sophisticated
3054 +management of device permissions. You can use devfsd to store
3055 +permissions for whole groups of devices with a single configuration
3056 +entry, rather than the conventional single entry per device entry.
3058 +Permissions database stored in mounted-over /dev
3060 +If you wish to save and restore your device permissions into the
3061 +disc-based /dev while still mounting devfs onto /dev
3062 +you may do so. This requires a 2.4.x kernel (in fact, 2.3.99 or
3063 +later), which has the VFS binding facility. You need to do the
3064 +following to set this up:
3068 +make sure the kernel does not mount devfs at boot time
3071 +make sure you have a correct /dev/console entry in your
3072 +root file-system (where your disc-based /dev lives)
3074 +create the /dev-state directory
3077 +add the following lines near the very beginning of your boot
3080 +mount --bind /dev /dev-state
3081 +mount -t devfs none /dev
3087 +add the following lines to your /etc/devfsd.conf file:
3089 +REGISTER ^pt[sy] IGNORE
3090 +CREATE ^pt[sy] IGNORE
3091 +CHANGE ^pt[sy] IGNORE
3092 +DELETE ^pt[sy] IGNORE
3093 +REGISTER .* COPY /dev-state/$devname $devpath
3094 +CREATE .* COPY $devpath /dev-state/$devname
3095 +CHANGE .* COPY $devpath /dev-state/$devname
3096 +DELETE .* CFUNCTION GLOBAL unlink /dev-state/$devname
3099 +Note that the sample devfsd.conf file contains these lines,
3100 +as well as other sample configurations you may find useful. See the
3101 +devfsd distribution
3109 +Permissions database stored in normal directory
3111 +If you are using an older kernel which doesn't support VFS binding,
3112 +then you won't be able to have the permissions database in a
3113 +mounted-over /dev. However, you can still use a regular
3114 +directory to store the database. The sample /etc/devfsd.conf
3115 +file above may still be used. You will need to create the
3116 +/dev-state directory prior to installing devfsd. If you have
3117 +old permissions in /dev, then just copy (or move) the device
3118 +nodes over to the new directory.
3120 +Which method is better?
3122 +The best method is to have the permissions database stored in the
3123 +mounted-over /dev. This is because you will not need to copy
3124 +device nodes over to /dev-state, and because it allows you to
3125 +switch between devfs and non-devfs kernels, without requiring you to
3126 +copy permissions between /dev-state (for devfs) and
3127 +/dev (for non-devfs).
3130 +Dealing with drivers without devfs support
3132 +Currently, not all device drivers in the kernel have been modified to
3133 +use devfs. Device drivers which do not yet have devfs support will not
3134 +automagically appear in devfs. The simplest way to create device nodes
3135 +for these drivers is to unpack a tarfile containing the required
3136 +device nodes. You can do this in your boot scripts. All your drivers
3137 +will now work as before.
3139 +Hopefully for most people devfs will have enough support so that they
3140 +can mount devfs directly over /dev without losing most functionality
3141 +(i.e. losing access to various devices). As of 22-JAN-1998 (devfs
3142 +patch version 10) I am now running this way. All the devices I have
3143 +are available in devfs, so I don't lose anything.
3145 +WARNING: if your configuration requires the old-style device names
3146 +(i.e. /dev/hda1 or /dev/sda1), you must install devfsd and configure
3147 +it to maintain compatibility entries. It is almost certain that you
3148 +will require this. Note that the kernel creates a compatibility entry
3149 +for the root device, so you don't need initrd.
3151 +Note that you no longer need to mount devpts if you use Unix98 PTYs,
3152 +as devfs can manage /dev/pts itself. This saves you some RAM, as you
3153 +don't need to compile and install devpts. Note that some versions of
3154 +glibc have a bug with Unix98 pty handling on devfs systems. Contact
3155 +the glibc maintainers for a fix. Glibc 2.1.3 has the fix.
3157 +Note also that apart from editing /etc/fstab, other things will need
3158 +to be changed if you *don't* install devfsd. Some software (like the X
3159 +server) hard-wire device names in their source. It really is much
3160 +easier to install devfsd so that compatibility entries are created.
3161 +You can then slowly migrate your system to using the new device names
3162 +(for example, by starting with /etc/fstab), and then limiting the
3163 +compatibility entries that devfsd creates.
3165 +IF YOU CONFIGURE TO MOUNT DEVFS AT BOOT, MAKE SURE YOU INSTALL DEVFSD
3166 +BEFORE YOU BOOT A DEVFS-ENABLED KERNEL!
3168 +Now that devfs has gone into the 2.3.46 kernel, I'm getting a lot of
3169 +reports back. Many of these are because people are trying to run
3170 +without devfsd, and hence some things break. Please just run devfsd if
3171 +things break. I want to concentrate on real bugs rather than
3172 +misconfiguration problems at the moment. If people are willing to fix
3173 +bugs/false assumptions in other code (i.e. glibc, X server) and submit
3174 +that to the respective maintainers, that would be great.
3177 +All the way with Devfs
3179 +The devfs kernel patch creates a rationalised device tree. As stated
3180 +above, if you want to keep using the old /dev naming scheme,
3181 +you just need to configure devfsd appopriately (see the man
3182 +page). People who prefer the old names can ignore this section. For
3183 +those of us who like the rationalised names and an uncluttered
3186 +If you don't run devfsd, or don't enable compatibility entry
3187 +management, then you will have to configure your system to use the new
3188 +names. For example, you will then need to edit your
3189 +/etc/fstab to use the new disc naming scheme. If you want to
3190 +be able to boot non-devfs kernels, you will need compatibility
3191 +symlinks in the underlying disc-based /dev pointing back to
3192 +the old-style names for when you boot a kernel without devfs.
3194 +You can selectively decide which devices you want compatibility
3195 +entries for. For example, you may only want compatibility entries for
3196 +BSD pseudo-terminal devices (otherwise you'll have to patch you C
3197 +library or use Unix98 ptys instead). It's just a matter of putting in
3198 +the correct regular expression into /dev/devfsd.conf.
3200 +There are other choices of naming schemes that you may prefer. For
3201 +example, I don't use the kernel-supplied
3202 +names, because they are too verbose. A common misconception is
3203 +that the kernel-supplied names are meant to be used directly in
3204 +configuration files. This is not the case. They are designed to
3205 +reflect the layout of the devices attached and to provide easy
3208 +If you like the kernel-supplied names, that's fine. If you don't then
3209 +you should be using devfsd to construct a namespace more to your
3210 +liking. Devfsd has built-in code to construct a
3211 +namespace that is both logical and easy to
3212 +manage. In essence, it creates a convenient abbreviation of the
3213 +kernel-supplied namespace.
3215 +You are of course free to build your own namespace. Devfsd has all the
3216 +infrastructure required to make this easy for you. All you need do is
3217 +write a script. You can even write some C code and devfsd can load the
3218 +shared object as a callable extension.
3224 +Another thing to take note of is whether your init programme
3225 +creates a Unix socket /dev/telinit. Some versions of init
3226 +create /dev/telinit so that the telinit programme can
3227 +communicate with the init process. If you have such a system you need
3228 +to make sure that devfs is mounted over /dev *before* init
3229 +starts. In other words, you can't leave the mounting of devfs to
3230 +/etc/rc, since this is executed after init. Other
3231 +versions of init require a named pipe /dev/initctl
3232 +which must exist *before* init starts. Once again, you need to
3233 +mount devfs and then create the named pipe *before* init
3236 +The default behaviour now is not to mount devfs onto /dev at
3237 +boot time for 2.3.x and later kernels. You can correct this with the
3238 +"devfs=mount" boot option. This solves any problems with init,
3239 +and also prevents the dreaded:
3241 +Cannot open initial console
3243 +message. For 2.2.x kernels where you need to apply the devfs patch,
3244 +the default is to mount.
3246 +If you have automatic mounting of devfs onto /dev then you
3247 +may need to create /dev/initctl in your boot scripts. The
3248 +following lines should suffice:
3250 +mknod /dev/initctl p
3251 +kill -SIGUSR1 1 # tell init that /dev/initctl now exists
3253 +Alternatively, if you don't want the kernel to mount devfs onto
3254 +/dev then you could use the following procedure is a
3255 +guideline for how to get around /dev/initctl problems:
3258 +# mv init init.real
3261 +mount -n -t devfs none /dev
3262 +mknod /dev/initctl p
3263 +exec /sbin/init.real $*
3267 +Note that newer versions of init create /dev/initctl
3268 +automatically, so you don't have to worry about this.
3271 +You will need to configure devfsd to enable module
3272 +autoloading. The following lines should be placed in your
3273 +/etc/devfsd.conf file:
3278 +As of devfsd-v1.3.10, a generic /etc/modules.devfs
3279 +configuration file is installed, which is used by the MODLOAD
3280 +action. This should be sufficient for most configurations. If you
3281 +require further configuration, edit your /etc/modules.conf
3282 +file. The way module autoloading work with devfs is:
3285 +a process attempts to lookup a device node (e.g. /dev/fred)
3288 +if that device node does not exist, the full pathname is passed to
3292 +devfsd will pass the string to the modprobe programme (provided the
3293 +configuration line shown above is present), and specifies that
3294 +/etc/modules.devfs is the configuration file
3297 +/etc/modules.devfs includes /etc/modules.conf to
3298 +access local configurations
3300 +modprobe will search it's configuration files, looking for an alias
3301 +that translates the pathname into a module name
3304 +the translated pathname is then used to load the module.
3307 +If you wanted a lookup of /dev/fred to load the
3308 +mymod module, you would require the following configuration
3309 +line in /etc/modules.conf:
3311 +alias /dev/fred mymod
3313 +The /etc/modules.devfs configuration file provides many such
3314 +aliases for standard device names. If you look closely at this file,
3315 +you will note that some modules require multiple alias configuration
3316 +lines. This is required to support module autoloading for old and new
3319 +Mounting root off a devfs device
3320 +If you wish to mount root off a devfs device when you pass the
3321 +"devfs=only" boot option, then you need to pass in the
3322 +"root=<device>" option to the kernel when booting. If you use
3323 +LILO, then you must have this in lilo.conf:
3325 +append = "root=<device>"
3327 +Surprised? Yep, so was I. It turns out if you have (as most people
3333 +then LILO will determine the device number of <device> and will
3334 +write that device number into a special place in the kernel image
3335 +before starting the kernel, and the kernel will use that device number
3336 +to mount the root filesystem. So, using the "append" variety ensures
3337 +that LILO passes the root filesystem device as a string, which devfs
3340 +Note that this isn't an issue if you don't pass "devfs=only".
3343 +The ttyname(3) function in some versions of the C library makes
3344 +false assumptions about device entries which are symbolic links. The
3345 +tty(1) programme is one that depends on this function. I've
3346 +written a patch to libc 5.4.43 which fixes this. This has been
3347 +included in libc 5.4.44 and a similar fix is in glibc 2.1.3.
3350 +Kernel Naming Scheme
3352 +The kernel provides a default naming scheme. This scheme is designed
3353 +to make it easy to search for specific devices or device types, and to
3354 +view the available devices. Some device types (such as hard discs),
3355 +have a directory of entries, making it easy to see what devices of
3356 +that class are available. Often, the entries are symbolic links into a
3357 +directory tree that reflects the topology of available devices. The
3358 +topological tree is useful for finding how your devices are arranged.
3360 +Below is a list of the naming schemes for the most common drivers. A
3361 +list of reserved device names is
3362 +available for reference. Please send email to
3363 +rgooch@atnf.csiro.au to obtain an allocation. Please be
3364 +patient (the maintainer is busy). An alternative name may be allocated
3365 +instead of the requested name, at the discretion of the maintainer.
3369 +All discs, whether SCSI, IDE or whatever, are placed under the
3370 +/dev/discs hierarchy:
3372 + /dev/discs/disc0 first disc
3373 + /dev/discs/disc1 second disc
3376 +Each of these entries is a symbolic link to the directory for that
3377 +device. The device directory contains:
3379 + disc for the whole disc
3380 + part* for individual partitions
3385 +All CD-ROMs, whether SCSI, IDE or whatever, are placed under the
3386 +/dev/cdroms hierarchy:
3388 + /dev/cdroms/cdrom0 first CD-ROM
3389 + /dev/cdroms/cdrom1 second CD-ROM
3392 +Each of these entries is a symbolic link to the real device entry for
3397 +All tapes, whether SCSI, IDE or whatever, are placed under the
3398 +/dev/tapes hierarchy:
3400 + /dev/tapes/tape0 first tape
3401 + /dev/tapes/tape1 second tape
3404 +Each of these entries is a symbolic link to the directory for that
3405 +device. The device directory contains:
3411 + mtn for mode 0, no rewind
3412 + mtln for mode 1, no rewind
3413 + mtmn for mode 2, no rewind
3414 + mtan for mode 3, no rewind
3419 +To uniquely identify any SCSI device requires the following
3422 + controller (host adapter)
3423 + bus (SCSI channel)
3425 + unit (Logical Unit Number)
3428 +All SCSI devices are placed under /dev/scsi (assuming devfs
3429 +is mounted on /dev). Hence, a SCSI device with the following
3430 +parameters: c=1,b=2,t=3,u=4 would appear as:
3432 + /dev/scsi/host1/bus2/target3/lun4 device directory
3435 +Inside this directory, a number of device entries may be created,
3436 +depending on which SCSI device-type drivers were installed.
3438 +See the section on the disc naming scheme to see what entries the SCSI
3439 +disc driver creates.
3441 +See the section on the tape naming scheme to see what entries the SCSI
3442 +tape driver creates.
3444 +The SCSI CD-ROM driver creates:
3449 +The SCSI generic driver creates:
3456 +To uniquely identify any IDE device requires the following
3460 + bus (aka. primary/secondary)
3461 + target (aka. master/slave)
3465 +All IDE devices are placed under /dev/ide, and uses a similar
3466 +naming scheme to the SCSI subsystem.
3470 +All XT discs are placed under /dev/xd. The first XT disc has
3471 +the directory /dev/xd/disc0.
3475 +The tty devices now appear as:
3477 + New name Old-name Device Type
3478 + -------- -------- -----------
3479 + /dev/tts/{0,1,...} /dev/ttyS{0,1,...} Serial ports
3480 + /dev/cua/{0,1,...} /dev/cua{0,1,...} Call out devices
3481 + /dev/vc/0 /dev/tty Current virtual console
3482 + /dev/vc/{1,2,...} /dev/tty{1...63} Virtual consoles
3483 + /dev/vcc/{0,1,...} /dev/vcs{1...63} Virtual consoles
3484 + /dev/pty/m{0,1,...} /dev/ptyp?? PTY masters
3485 + /dev/pty/s{0,1,...} /dev/ttyp?? PTY slaves
3490 +The RAMDISCS are placed in their own directory, and are named thus:
3492 + /dev/rd/{0,1,2,...}
3497 +The meta devices are placed in their own directory, and are named
3500 + /dev/md/{0,1,2,...}
3505 +Floppy discs are placed in the /dev/floppy directory.
3509 +Loop devices are placed in the /dev/loop directory.
3513 +Sound devices are placed in the /dev/sound directory
3514 +(audio, sequencer, ...).
3517 +Devfsd Naming Scheme
3519 +Devfsd provides a naming scheme which is a convenient abbreviation of
3520 +the kernel-supplied namespace. In some
3521 +cases, the kernel-supplied naming scheme is quite convenient, so
3522 +devfsd does not provide another naming scheme. The convenience names
3523 +that devfsd creates are in fact the same names as the original devfs
3524 +kernel patch created (before Linus mandated the Big Name
3525 +Change). These are referred to as "new compatibility entries".
3527 +In order to configure devfsd to create these convenience names, the
3528 +following lines should be placed in your /etc/devfsd.conf:
3530 +REGISTER .* MKNEWCOMPAT
3531 +UNREGISTER .* RMNEWCOMPAT
3533 +This will cause devfsd to create (and destroy) symbolic links which
3534 +point to the kernel-supplied names.
3538 +All SCSI discs are placed under /dev/sd (assuming devfs is
3539 +mounted on /dev). Hence, a SCSI disc with the following
3540 +parameters: c=1,b=2,t=3,u=4 would appear as:
3542 + /dev/sd/c1b2t3u4 for the whole disc
3543 + /dev/sd/c1b2t3u4p5 for the 5th partition
3544 + /dev/sd/c1b2t3u4p5s6 for the 6th slice in the 5th partition
3549 +All SCSI tapes are placed under /dev/st. A similar naming
3550 +scheme is used as for SCSI discs. A SCSI tape with the
3551 +parameters:c=1,b=2,t=3,u=4 would appear as:
3553 + /dev/st/c1b2t3u4m0 for mode 0
3554 + /dev/st/c1b2t3u4m1 for mode 1
3555 + /dev/st/c1b2t3u4m2 for mode 2
3556 + /dev/st/c1b2t3u4m3 for mode 3
3557 + /dev/st/c1b2t3u4m0n for mode 0, no rewind
3558 + /dev/st/c1b2t3u4m1n for mode 1, no rewind
3559 + /dev/st/c1b2t3u4m2n for mode 2, no rewind
3560 + /dev/st/c1b2t3u4m3n for mode 3, no rewind
3565 +All SCSI CD-ROMs are placed under /dev/sr. A similar naming
3566 +scheme is used as for SCSI discs. A SCSI CD-ROM with the
3567 +parameters:c=1,b=2,t=3,u=4 would appear as:
3572 +SCSI Generic Devices
3574 +The generic (aka. raw) interface for all SCSI devices are placed under
3575 +/dev/sg. A similar naming scheme is used as for SCSI discs. A
3576 +SCSI generic device with the parameters:c=1,b=2,t=3,u=4 would appear
3584 +All IDE discs are placed under /dev/ide/hd, using a similar
3585 +convention to SCSI discs. The following mappings exist between the new
3588 + /dev/hda /dev/ide/hd/c0b0t0u0
3589 + /dev/hdb /dev/ide/hd/c0b0t1u0
3590 + /dev/hdc /dev/ide/hd/c0b1t0u0
3591 + /dev/hdd /dev/ide/hd/c0b1t1u0
3596 +A similar naming scheme is used as for IDE discs. The entries will
3597 +appear in the /dev/ide/mt directory.
3601 +A similar naming scheme is used as for IDE discs. The entries will
3602 +appear in the /dev/ide/cd directory.
3606 +A similar naming scheme is used as for IDE discs. The entries will
3607 +appear in the /dev/ide/fd directory.
3611 +All XT discs are placed under /dev/xd. The first XT disc
3612 +would appear as /dev/xd/c0t0.
3615 +Old Compatibility Names
3617 +The old compatibility names are the legacy device names, such as
3618 +/dev/hda, /dev/sda, /dev/rtc and so on.
3619 +Devfsd can be configured to create compatibility symlinks so that you
3620 +may continue to use the old names in your configuration files and so
3621 +that old applications will continue to function correctly.
3623 +In order to configure devfsd to create these legacy names, the
3624 +following lines should be placed in your /etc/devfsd.conf:
3626 +REGISTER .* MKOLDCOMPAT
3627 +UNREGISTER .* RMOLDCOMPAT
3629 +This will cause devfsd to create (and destroy) symbolic links which
3630 +point to the kernel-supplied names.
3633 +-----------------------------------------------------------------------------
3636 +Device drivers currently ported
3638 +- All miscellaneous character devices support devfs (this is done
3639 + transparently through misc_register())
3641 +- SCSI discs and generic hard discs
3643 +- Character memory devices (null, zero, full and so on)
3644 + Thanks to C. Scott Ananian <cananian@alumni.princeton.edu>
3646 +- Loop devices (/dev/loop?)
3648 +- TTY devices (console, serial ports, terminals and pseudo-terminals)
3649 + Thanks to C. Scott Ananian <cananian@alumni.princeton.edu>
3651 +- SCSI tapes (/dev/scsi and /dev/tapes)
3653 +- SCSI CD-ROMs (/dev/scsi and /dev/cdroms)
3655 +- SCSI generic devices (/dev/scsi)
3657 +- RAMDISCS (/dev/ram?)
3659 +- Meta Devices (/dev/md*)
3661 +- Floppy discs (/dev/floppy)
3663 +- Parallel port printers (/dev/printers)
3665 +- Sound devices (/dev/sound)
3666 + Thanks to Eric Dumas <dumas@linux.eu.org> and
3667 + C. Scott Ananian <cananian@alumni.princeton.edu>
3669 +- Joysticks (/dev/joysticks)
3671 +- Sparc keyboard (/dev/kbd)
3673 +- DSP56001 digital signal processor (/dev/dsp56k)
3675 +- Apple Desktop Bus (/dev/adb)
3677 +- Coda network file system (/dev/cfs*)
3679 +- Virtual console capture devices (/dev/vcc)
3680 + Thanks to Dennis Hou <smilax@mindmeld.yi.org>
3682 +- Frame buffer devices (/dev/fb)
3684 +- Video capture devices (/dev/v4l)
3687 +-----------------------------------------------------------------------------
3690 +Allocation of Device Numbers
3692 +Devfs allows you to write a driver which doesn't need to allocate a
3693 +device number (major&minor numbers) for the internal operation of the
3694 +kernel. However, there are a number of userspace programmes that use
3695 +the device number as a unique handle for a device. An example is the
3696 +find programme, which uses device numbers to determine whether
3697 +an inode is on a different filesystem than another inode. The device
3698 +number used is the one for the block device which a filesystem is
3699 +using. To preserve compatibility with userspace programmes, block
3700 +devices using devfs need to have unique device numbers allocated to
3701 +them. Furthermore, POSIX specifies device numbers, so some kind of
3702 +device number needs to be presented to userspace.
3704 +The simplest option (especially when porting drivers to devfs) is to
3705 +keep using the old major and minor numbers. Devfs will take whatever
3706 +values are given for major&minor and pass them onto userspace.
3708 +This device number is a 16 bit number, so this leaves plenty of space
3709 +for large numbers of discs and partitions. This scheme can also be
3710 +used for character devices, in particular the tty devices, which are
3711 +currently limited to 256 pseudo-ttys (this limits the total number of
3712 +simultaneous xterms and remote logins). Note that the device number
3713 +is limited to the range 36864-61439 (majors 144-239), in order to
3714 +avoid any possible conflicts with existing official allocations.
3716 +Please note that using dynamically allocated block device numbers may
3717 +break the NFS daemons (both user and kernel mode), which expect dev_t
3718 +for a given device to be constant over the lifetime of remote mounts.
3720 +A final note on this scheme: since it doesn't increase the size of
3721 +device numbers, there are no compatibility issues with userspace.
3723 +-----------------------------------------------------------------------------
3726 +Questions and Answers
3730 +Alternatives to devfs
3731 +What I don't like about devfs
3733 +Strange kernel messages
3734 +Compilation problems with devfsd
3740 +Here are some common questions and answers.
3744 +Devfsd doesn't start
3746 +Make sure you have compiled and installed devfsd
3747 +Make sure devfsd is being started from your boot
3749 +Make sure you have configured your kernel to enable devfs (see
3751 +Make sure devfs is mounted (see below)
3754 +Devfsd is not managing all my permissions
3756 +Make sure you are capturing the appropriate events. For example,
3757 +device entries created by the kernel generate REGISTER events,
3758 +but those created by devfsd generate CREATE events.
3761 +Devfsd is not capturing all REGISTER events
3763 +See the previous entry: you may need to capture CREATE events.
3768 +Make sure you followed the steps
3772 +Why don't my network devices appear in devfs?
3774 +This is not a bug. Network devices have their own, completely separate
3775 +namespace. They are accessed via socket(2) and
3776 +setsockopt(2) calls, and thus require no device nodes. I have
3777 +raised the possibilty of moving network devices into the device
3778 +namespace, but have had no response.
3781 +How can I test if I have devfs compiled into my kernel?
3783 +All filesystems built-in or currently loaded are listed in
3784 +/proc/filesystems. If you see a devfs entry, then
3785 +you know that devfs was compiled into your kernel. If you have
3786 +correctly configured and rebuilt your kernel, then devfs will be
3787 +built-in. If you think you've configured it in, but
3788 +/proc/filesystems doesn't show it, you've made a mistake.
3789 +Common mistakes include:
3791 +Using a 2.2.x kernel without applying the devfs patch (if you
3792 +don't know how to patch your kernel, use 2.4.x instead, don't bother
3793 +asking me how to patch)
3794 +Forgetting to set CONFIG_EXPERIMENTAL=y
3795 +Forgetting to set CONFIG_DEVFS_FS=y
3796 +Forgetting to set CONFIG_DEVFS_MOUNT=y (if you want devfs
3797 +to be automatically mounted at boot)
3798 +Editing your .config manually, instead of using make
3799 +config or make xconfig
3800 +Forgetting to run make dep; make clean after changing the
3801 +configuration and before compiling
3802 +Forgetting to compile your kernel and modules
3803 +Forgetting to install your kernel
3804 +Forgetting to install your modules
3806 +Please check twice that you've done all these steps before sending in
3811 +How can I test if devfs is mounted on /dev?
3813 +The device filesystem will always create an entry called
3814 +".devfsd", which is used to communicate with the daemon. Even
3815 +if the daemon is not running, this entry will exist. Testing for the
3816 +existence of this entry is the approved method of determining if devfs
3817 +is mounted or not. Note that the type of entry (i.e. regular file,
3818 +character device, named pipe, etc.) may change without notice. Only
3819 +the existence of the entry should be relied upon.
3822 +When I start devfsd, I see the error:
3823 +Error opening file: ".devfsd" No such file or directory?
3825 +This means that devfs is not mounted. Make sure you have devfs mounted.
3828 +How do I mount devfs?
3830 +First make sure you have devfs compiled into your kernel (see
3831 +above). Then you will either need to:
3833 +set CONFIG_DEVFS_MOUNT=y in your kernel config
3834 +pass devfs=mount to your boot loader
3835 +mount devfs manually in your boot scripts with:
3836 +mount -t none devfs /dev
3840 +Mount by volume LABEL=<label> doesn't work with
3843 +Most probably you are not mounting devfs onto /dev. What
3844 +happens is that if your kernel config has CONFIG_DEVFS_FS=y
3845 +then the contents of /proc/partitions will have the devfs
3846 +names (such as scsi/host0/bus0/target0/lun0/part1). The
3847 +contents of /proc/partitions are used by mount(8) when
3848 +mounting by volume label. If devfs is not mounted on /dev,
3849 +then mount(8) will fail to find devices. The solution is to
3850 +make sure that devfs is mounted on /dev. See above for how to
3854 +I have extra or incorrect entries in /dev
3856 +You may have stale entries in your dev-state area. Check for a
3857 +RESTORE configuration line in your devfsd configuration
3858 +(typically /etc/devfsd.conf). If you have this line, check
3859 +the contents of the specified directory for stale entries. Remove
3860 +any entries which are incorrect, then reboot.
3863 +I get "Unable to open initial console" messages at boot
3865 +This usually happens when you don't have devfs automounted onto
3866 +/dev at boot time, and there is no valid
3867 +/dev/console entry on your root file-system. Create a valid
3868 +/dev/console device node.
3874 +Alternatives to devfs
3876 +I've attempted to collate all the anti-devfs proposals and explain
3877 +their limitations. Under construction.
3880 +Why not just pass device create/remove events to a daemon?
3882 +Here the suggestion is to develop an API in the kernel so that devices
3883 +can register create and remove events, and a daemon listens for those
3884 +events. The daemon would then populate/depopulate /dev (which
3887 +This has several limitations:
3890 +it only works for modules loaded and unloaded (or devices inserted
3891 +and removed) after the kernel has finished booting. Without a database
3892 +of events, there is no way the daemon could fully populate
3896 +if you add a database to this scheme, the question is then how to
3897 +present that database to user-space. If you make it a list of strings
3898 +with embedded event codes which are passed through a pipe to the
3899 +daemon, then this is only of use to the daemon. I would argue that the
3900 +natural way to present this data is via a filesystem (since many of
3901 +the events will be of a hierarchical nature), such as devfs.
3902 +Presenting the data as a filesystem makes it easy for the user to see
3903 +what is available and also makes it easy to write scripts to scan the
3907 +the tight binding between device nodes and drivers is no longer
3908 +possible (requiring the otherwise perfectly avoidable
3912 +you cannot catch inode lookup events on /dev which means
3913 +that module autoloading requires device nodes to be created. This is a
3914 +problem, particularly for drivers where only a few inodes are created
3915 +from a potentially large set
3918 +this technique can't be used when the root FS is mounted
3924 +Just implement a better scsidev
3926 +This suggestion involves taking the scsidev programme and
3927 +extending it to scan for all devices, not just SCSI devices. The
3928 +scsidev programme works by scanning /proc/scsi
3933 +the kernel does not currently provide a list of all devices
3934 +available. Not all drivers register entries in /proc or
3935 +generate kernel messages
3938 +there is no uniform mechanism to register devices other than the
3942 +implementing such an API is then the same as the
3948 +Put /dev on a ramdisc
3950 +This suggestion involves creating a ramdisc and populating it with
3951 +device nodes and then mounting it over /dev.
3957 +this doesn't help when mounting the root filesystem, since you
3958 +still need a device node to do that
3961 +if you want to use this technique for the root device node as
3962 +well, you need to use initrd. This complicates the booting sequence
3963 +and makes it significantly harder to administer and configure. The
3964 +initrd is essentially opaque, robbing the system administrator of easy
3968 +insufficient information is available to correctly populate the
3969 +ramdisc. So we come back to the
3970 +proposal above to "solve" this
3973 +a ramdisc-based solution would take more kernel memory, since the
3974 +backing store would be (at best) normal VFS inodes and dentries, which
3975 +take 284 bytes and 112 bytes, respectively, for each entry. Compare
3976 +that to 72 bytes for devfs
3981 +Do nothing: there's no problem
3983 +Sometimes people can be heard to claim that the existing scheme is
3984 +fine. This is what they're ignoring:
3987 +device number size (8 bits each for major and minor) is a real
3988 +limitation, and must be fixed somehow. Systems with large numbers of
3989 +SCSI devices, for example, will continue to consume the remaining
3990 +unallocated major numbers. USB will also need to push beyond the 8 bit
3994 +simply increasing the device number size is insufficient. Apart
3995 +from causing a lot of pain, it doesn't solve the management issues
3996 +of a /dev with thousands or more device nodes
3999 +ignoring the problem of a huge /dev will not make it go
4000 +away, and dismisses the legitimacy of a large number of people who
4001 +want a dynamic /dev
4004 +the standard response then becomes: "write a device management
4005 +daemon", which brings us back to the
4011 +What I don't like about devfs
4013 +Here are some common complaints about devfs, and some suggestions and
4014 +solutions that may make it more palatable for you. I can't please
4015 +everybody, but I do try :-)
4017 +I hate the naming scheme
4019 +First, remember that no naming scheme will please everybody. You hate
4020 +the scheme, others love it. Who's to say who's right and who's wrong?
4021 +Ultimately, the person who writes the code gets to choose, and what
4022 +exists now is a combination of the choices made by the
4023 +devfs author and the
4024 +kernel maintainer (Linus).
4026 +However, not all is lost. If you want to create your own naming
4027 +scheme, it is a simple matter to write a standalone script, hack
4028 +devfsd, or write a script called by devfsd. You can create whatever
4029 +naming scheme you like.
4031 +Further, if you want to remove all traces of the devfs naming scheme
4032 +from /dev, you can mount devfs elsewhere (say
4033 +/devfs) and populate /dev with links into
4034 +/devfs. This population can be automated using devfsd if you
4037 +You can even use the VFS binding facility to make the links, rather
4038 +than using symbolic links. This way, you don't even have to see the
4039 +"destination" of these symbolic links.
4041 +Devfs puts policy into the kernel
4043 +There's already policy in the kernel. Device numbers are in fact
4044 +policy (why should the kernel dictate what device numbers I use?).
4045 +Face it, some policy has to be in the kernel. The real difference
4046 +between device names as policy and device numbers as policy is that
4047 +no one will use device numbers directly, because device
4048 +numbers are devoid of meaning to humans and are ugly. At least with
4049 +the devfs device names, (even though you can add your own naming
4050 +scheme) some people will use the devfs-supplied names directly. This
4051 +offends some people :-)
4055 +This is not even remotely true. As shown above,
4056 +both code and data size are quite modest.
4061 +If you have (or think you have) a bug with devfs, please follow the
4066 +make sure you have enabled debugging output when configuring your
4067 +kernel. You will need to set (at least) the following config options:
4069 +CONFIG_DEVFS_DEBUG=y
4070 +CONFIG_DEBUG_KERNEL=y
4071 +CONFIG_DEBUG_SLAB=y
4075 +please make sure you have the latest devfs patches applied. The
4076 +latest kernel version might not have the latest devfs patches applied
4077 +yet (Linus is very busy)
4080 +save a copy of your complete kernel logs (preferably by
4081 +using the dmesg programme) for later inclusion in your bug
4082 +report. You may need to use the -s switch to increase the
4083 +internal buffer size so you can capture all the boot messages.
4084 +Don't edit or trim the dmesg output
4089 +try booting with devfs=dall passed to the kernel boot