Re: CVS commit: src/usr.bin/units

2012-12-28 Thread Alan Barrett

On Sat, 29 Dec 2012, Robert Elz wrote:

 | because unit names cannot contain hyphens.

Should that not be mentioned in the man page?   Perhaps together with a
suggestion that if the name the user requires should have hyphens, it
simply be entered with the hyphens deleted  ... perhaps even using
tappit-hen as an example.


Good idea.

--apb (Alan Barrett)


Re: CVS commit: src/usr.bin/units

2012-12-28 Thread Robert Elz
Date:Fri, 28 Dec 2012 17:57:46 +
From:"Alan Barrett" 
Message-ID:  <20121228175746.e19f117...@cvs.netbsd.org>

  | because unit names cannot contain hyphens.

Should that not be mentioned in the man page?   Perhaps together with a
suggestion that if the name the user requires should have hyphens, it
simply be entered with the hyphens deleted  ... perhaps even using
tappit-hen as an example.

kre


Re: CVS commit: src/sys

2012-12-28 Thread J. Hannken-Illjes
On Dec 27, 2012, at 11:46 PM, Taylor R Campbell  wrote:

>   From: hann...@netbsd.org
>   Date: Thu, 20 Dec 2012 08:03:46 +
> 
>   --- sys/fs/msdosfs/msdosfs_vnops.c  29 Apr 2012 22:53:59 -  1.83
>   +++ sys/fs/msdosfs/msdosfs_vnops.c  20 Dec 2012 08:03:42 -  1.84
>   @@ -527,7 +527,6 @@ msdosfs_read(void *v)
>   NOCRED, 0, &bp);
>   n = MIN(n, pmp->pm_bpcluster - bp->b_resid);
>   if (error) {
>   -   brelse(bp, 0);
> 
> Looks like you need to move the initialization of n to after the error
> branch.

Fixed, thanks.

>   --- sys/ufs/ext2fs/ext2fs_vfsops.c  21 Nov 2012 23:11:23 -  
> 1.167
>   +++ sys/ufs/ext2fs/ext2fs_vfsops.c  20 Dec 2012 08:03:44 -  
> 1.168
>   @@ -772,8 +770,8 @@ ext2fs_mountfs(struct vnode *devvp, stru
>   return (0);
> 
>out:
>   -   KASSERT(bp != NULL);
>   -   brelse(bp, 0);
>   +   if (bp != NULL)
>   +   brelse(bp, 0);
> 
> 
> Are bread &c. supposed to guarantee that bp is null on error, or are
> they supposed to leave it in an undefined state?  Either way, it seems
> to me that the intent ought to be documented in buffercache(9).

Both bread() and breadn() will either return with `error == 0, *bpp != NULL'
or `error != 0, *bpp == NULL'.

--
J. Hannken-Illjes - hann...@eis.cs.tu-bs.de - TU Braunschweig (Germany)