git: DEVFS - Modification of clone behaviour; general cleanup; x

看板DFBSD_commit作者時間16年前 (2009/08/11 17:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 07dfa375a25f4ef43c956ee33c739661306f6019 Author: Alex Hornung <ahornung@gmail.com> Date: Mon Aug 10 20:18:03 2009 +0100 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 Summary of changes: sys/kern/kern_conf.c | 26 +++++++++++-- sys/sys/device.h | 20 ++++++----- sys/vfs/devfs/devfs.h | 52 +++++++++++++------------- sys/vfs/devfs/devfs_core.c | 84 ++++++++++++++++++------------------------ sys/vfs/devfs/devfs_vnops.c | 75 ++++++++++++++++++++++++-------------- 5 files changed, 142 insertions(+), 115 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/07dfa375a25f4ef43c956ee33c739661306f6019 -- DragonFly BSD source repository
文章代碼(AID): #1AWJDH58 (DFBSD_commit)