DEVFS - Modification of clone behaviour; general cleanup; xtime
authorAlex Hornung <ahornung@gmail.com>
Mon, 10 Aug 2009 19:18:03 +0000 (20:18 +0100)
committerAlex Hornung <ahornung@gmail.com>
Tue, 11 Aug 2009 09:08:14 +0000 (10:08 +0100)
commit07dfa375a25f4ef43c956ee33c739661306f6019
tree92bc80ef1b1ba1afd8d986b0d20e08c74e490336
parent5466e0749b2fd015659c1dd7889b2d2d0a0e70b7
DEVFS - Modification of clone behaviour; general cleanup; xtime

* Use default_dev_ops by default for make_autoclone_dev so that opens
  and other operations on it fail when it fails as a clone handler.

* Accept NULL as argument for bimtap for make_autoclone_dev, so that
  there's no explicit need for a clone bitmap to use this function.

* Add destroy_autoclone_dev as a counterpart to make_autoclone_dev.

* Const-ify a bunch of char *

* Use kstrdup instead of kmalloc + memcpy magic at a few places where
  this makes sense.

* Rework atime/mtime/ctime as advised by Simon Schubert on IRC.

* Clean up devfs_clone by getting rid of old code and return NULL
  if cloning fails, else return the cloned device.

* Sync up all pending devfs operations just before calling into the
  clone handler, so that issues with device deletion/creation are
  dealt with appropriately.

* Change cloning in devfs_spec_open to match devfs_clone changes and
  also check the return value of devfs_create_device_node, as it can
  return NULL. If cloning fails, the cloning device will be opened,
  which will have the default_ops and hence will fail returning
  ENODEV.

* Cosmetic changes

Suggested-By: Simon "corecode" Schubert
sys/kern/kern_conf.c
sys/sys/device.h
sys/vfs/devfs/devfs.h
sys/vfs/devfs/devfs_core.c
sys/vfs/devfs/devfs_vnops.c