From: Hiten Pandya Date: Fri, 26 Aug 2005 12:45:53 +0000 (+0000) Subject: Add more documentation comments to disk_create() and dscheck(). X-Git-Tag: v2.0.1~6181 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/ea5f287182872b084f412fec3ea27738627f8a96 Add more documentation comments to disk_create() and dscheck(). --- diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index b18295f805..0f3f82a219 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -77,7 +77,7 @@ * @(#)ufs_disksubr.c 8.5 (Berkeley) 1/21/94 * $FreeBSD: src/sys/kern/subr_disk.c,v 1.20.2.6 2001/10/05 07:14:57 peter Exp $ * $FreeBSD: src/sys/ufs/ufs/ufs_disksubr.c,v 1.44.2.3 2001/03/05 05:42:19 obrien Exp $ - * $DragonFly: src/sys/kern/subr_disk.c,v 1.16 2005/08/07 03:17:37 hmp Exp $ + * $DragonFly: src/sys/kern/subr_disk.c,v 1.17 2005/08/26 12:45:53 hmp Exp $ */ #include @@ -119,6 +119,11 @@ static LIST_HEAD(, disk) disklist = LIST_HEAD_INITIALIZER(&disklist); * high level partition operations, then forwarding the requests to the * raw device. * + * The disk_create() function clones the provided rawsw for creating a + * managed disk device. In addition, the cdevsw intercept port is + * changed to disk_putport, which is used to transform requests for the + * managed disk device. + * * The raw device (based on rawsw) is returned to the caller, NOT the * slice and unit managed cdev. The caller typically sets various * driver parameters and IO limits on the returned rawdev which we must diff --git a/sys/kern/subr_diskslice.c b/sys/kern/subr_diskslice.c index 307af661a3..bc3aa0cabf 100644 --- a/sys/kern/subr_diskslice.c +++ b/sys/kern/subr_diskslice.c @@ -44,7 +44,7 @@ * from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91 * from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $ * $FreeBSD: src/sys/kern/subr_diskslice.c,v 1.82.2.6 2001/07/24 09:49:41 dd Exp $ - * $DragonFly: src/sys/kern/subr_diskslice.c,v 1.11 2005/08/03 16:36:33 hmp Exp $ + * $DragonFly: src/sys/kern/subr_diskslice.c,v 1.12 2005/08/26 12:45:53 hmp Exp $ */ #include @@ -131,6 +131,11 @@ clone_label(struct disklabel *lp) * o Split buffers that are too big for the device. * o Check for overflow. * o Finish cleaning this up. + * + * This function returns 1 on success, 0 if transfer equates + * to EOF (end of disk) or -1 on failure. The appropriate + * 'errno' value is also set in bp->b_error and bp->b_flags + * is marked with B_ERROR. */ int dscheck(struct buf *bp, struct diskslices *ssp)