From owner-svn-src-all@FreeBSD.ORG Sun May 22 01:07:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC41B106566C; Sun, 22 May 2011 01:07:54 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7FCC8FC0A; Sun, 22 May 2011 01:07:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4M17s6L052658; Sun, 22 May 2011 01:07:54 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4M17sW1052635; Sun, 22 May 2011 01:07:54 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105220107.p4M17sW1052635@svn.freebsd.org> From: Rick Macklem Date: Sun, 22 May 2011 01:07:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222167 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/cd9660 fs/ext2fs fs/hpfs fs/msdosfs fs/nfsserver fs/ntfs fs/nullfs fs/tmpfs fs/udf fs/unionfs gnu/fs/reiserfs gnu/fs... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 01:07:54 -0000 Author: rmacklem Date: Sun May 22 01:07:54 2011 New Revision: 222167 URL: http://svn.freebsd.org/changeset/base/222167 Log: Add a lock flags argument to the VFS_FHTOVP() file system method, so that callers can indicate the minimum vnode locking requirement. This will allow some file systems to choose to return a LK_SHARED locked vnode when LK_SHARED is specified for the flags argument. This patch only adds the flag. It does not change any file system to use it and all callers specify LK_EXCLUSIVE, so file system semantics are not changed. Reviewed by: kib Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c head/sys/fs/cd9660/cd9660_vfsops.c head/sys/fs/ext2fs/ext2_vfsops.c head/sys/fs/hpfs/hpfs_vfsops.c head/sys/fs/msdosfs/msdosfs_vfsops.c head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/fs/ntfs/ntfs_vfsops.c head/sys/fs/nullfs/null_vfsops.c head/sys/fs/tmpfs/tmpfs_vfsops.c head/sys/fs/udf/udf_vfsops.c head/sys/fs/unionfs/union_vfsops.c head/sys/gnu/fs/reiserfs/reiserfs_vfsops.c head/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c head/sys/kern/vfs_default.c head/sys/kern/vfs_syscalls.c head/sys/nfsserver/nfs_srvsubs.c head/sys/nlm/nlm_prot_impl.c head/sys/sys/mount.h head/sys/sys/param.h head/sys/ufs/ffs/ffs_vfsops.c head/sys/ufs/ufs/ufs_extern.h head/sys/ufs/ufs/ufs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -93,7 +93,7 @@ static int zfs_vget(vfs_t *vfsp, ino_t i static int zfs_sync(vfs_t *vfsp, int waitfor); static int zfs_checkexp(vfs_t *vfsp, struct sockaddr *nam, int *extflagsp, struct ucred **credanonp, int *numsecflavors, int **secflavors); -static int zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vnode_t **vpp); +static int zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, int flags, vnode_t **vpp); static void zfs_objset_close(zfsvfs_t *zfsvfs); static void zfs_freevfs(vfs_t *vfsp); @@ -2007,7 +2007,7 @@ CTASSERT(SHORT_FID_LEN <= sizeof(struct CTASSERT(LONG_FID_LEN <= sizeof(struct fid)); static int -zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vnode_t **vpp) +zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, int flags, vnode_t **vpp) { zfsvfs_t *zfsvfs = vfsp->vfs_data; znode_t *zp; Modified: head/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/fs/cd9660/cd9660_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -586,9 +586,10 @@ cd9660_statfs(mp, sbp) /* ARGSUSED */ static int -cd9660_fhtovp(mp, fhp, vpp) +cd9660_fhtovp(mp, fhp, flags, vpp) struct mount *mp; struct fid *fhp; + int flags; struct vnode **vpp; { struct ifid ifh; Modified: head/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/fs/ext2fs/ext2_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -973,7 +973,7 @@ ext2_vget(struct mount *mp, ino_t ino, i * those rights via. exflagsp and credanonp */ static int -ext2_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) +ext2_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) { struct inode *ip; struct ufid *ufhp; Modified: head/sys/fs/hpfs/hpfs_vfsops.c ============================================================================== --- head/sys/fs/hpfs/hpfs_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/fs/hpfs/hpfs_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -417,6 +417,7 @@ static int hpfs_fhtovp( struct mount *mp, struct fid *fhp, + int flags, struct vnode **vpp) { struct vnode *nvp; Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/fs/msdosfs/msdosfs_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -963,7 +963,7 @@ loop: } static int -msdosfs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) +msdosfs_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) { struct msdosfsmount *pmp = VFSTOMSDOSFS(mp); struct defid *defhp = (struct defid *) fhp; Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Sun May 22 01:07:54 2011 (r222167) @@ -2551,7 +2551,7 @@ nfsvno_fhtovp(struct mount *mp, fhandle_ if (VFS_NEEDSGIANT(mp)) error = ESTALE; else - error = VFS_FHTOVP(mp, &fhp->fh_fid, vpp); + error = VFS_FHTOVP(mp, &fhp->fh_fid, LK_EXCLUSIVE, vpp); if (error != 0) /* Make sure the server replies ESTALE to the client. */ error = ESTALE; @@ -2834,7 +2834,7 @@ nfsvno_getvp(fhandle_t *fhp) mp = vfs_busyfs(&fhp->fh_fsid); if (mp == NULL) return (NULL); - error = VFS_FHTOVP(mp, &fhp->fh_fid, &vp); + error = VFS_FHTOVP(mp, &fhp->fh_fid, LK_EXCLUSIVE, &vp); vfs_unbusy(mp); if (error) return (NULL); Modified: head/sys/fs/ntfs/ntfs_vfsops.c ============================================================================== --- head/sys/fs/ntfs/ntfs_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/fs/ntfs/ntfs_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -616,6 +616,7 @@ static int ntfs_fhtovp( struct mount *mp, struct fid *fhp, + int flags, struct vnode **vpp) { struct vnode *nvp; Modified: head/sys/fs/nullfs/null_vfsops.c ============================================================================== --- head/sys/fs/nullfs/null_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/fs/nullfs/null_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -321,13 +321,15 @@ nullfs_vget(mp, ino, flags, vpp) } static int -nullfs_fhtovp(mp, fidp, vpp) +nullfs_fhtovp(mp, fidp, flags, vpp) struct mount *mp; struct fid *fidp; + int flags; struct vnode **vpp; { int error; - error = VFS_FHTOVP(MOUNTTONULLMOUNT(mp)->nullm_vfs, fidp, vpp); + error = VFS_FHTOVP(MOUNTTONULLMOUNT(mp)->nullm_vfs, fidp, LK_EXCLUSIVE, + vpp); if (error) return (error); Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -71,7 +71,8 @@ MALLOC_DEFINE(M_TMPFSNAME, "tmpfs name", static int tmpfs_mount(struct mount *); static int tmpfs_unmount(struct mount *, int); static int tmpfs_root(struct mount *, int flags, struct vnode **); -static int tmpfs_fhtovp(struct mount *, struct fid *, struct vnode **); +static int tmpfs_fhtovp(struct mount *, struct fid *, int, + struct vnode **); static int tmpfs_statfs(struct mount *, struct statfs *); /* --------------------------------------------------------------------- */ @@ -341,7 +342,8 @@ tmpfs_root(struct mount *mp, int flags, /* --------------------------------------------------------------------- */ static int -tmpfs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) +tmpfs_fhtovp(struct mount *mp, struct fid *fhp, int flags, + struct vnode **vpp) { boolean_t found; struct tmpfs_fid *tfhp; Modified: head/sys/fs/udf/udf_vfsops.c ============================================================================== --- head/sys/fs/udf/udf_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/fs/udf/udf_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -722,7 +722,7 @@ udf_vget(struct mount *mp, ino_t ino, in } static int -udf_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) +udf_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) { struct ifid *ifhp; struct vnode *nvp; Modified: head/sys/fs/unionfs/union_vfsops.c ============================================================================== --- head/sys/fs/unionfs/union_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/fs/unionfs/union_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -454,7 +454,8 @@ unionfs_vget(struct mount *mp, ino_t ino } static int -unionfs_fhtovp(struct mount *mp, struct fid *fidp, struct vnode **vpp) +unionfs_fhtovp(struct mount *mp, struct fid *fidp, int flags, + struct vnode **vpp) { return (EOPNOTSUPP); } Modified: head/sys/gnu/fs/reiserfs/reiserfs_vfsops.c ============================================================================== --- head/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -335,7 +335,8 @@ reiserfs_statfs(struct mount *mp, struct * those rights via. exflagsp and credanonp */ static int -reiserfs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) +reiserfs_fhtovp(struct mount *mp, struct fid *fhp, int flags, + struct vnode **vpp) { int error; struct rfid *rfhp; Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c ============================================================================== --- head/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c Sun May 22 01:07:54 2011 (r222167) @@ -370,9 +370,10 @@ _xfs_vget(mp, ino, flags, vpp) } static int -_xfs_fhtovp(mp, fidp, vpp) +_xfs_fhtovp(mp, fidp, flags, vpp) struct mount *mp; struct fid *fidp; + int flags; struct vnode **vpp; { printf("xfs_fhtovp\n"); Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/kern/vfs_default.c Sun May 22 01:07:54 2011 (r222167) @@ -1081,9 +1081,10 @@ vfs_stdvget (mp, ino, flags, vpp) } int -vfs_stdfhtovp (mp, fhp, vpp) +vfs_stdfhtovp (mp, fhp, flags, vpp) struct mount *mp; struct fid *fhp; + int flags; struct vnode **vpp; { Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/kern/vfs_syscalls.c Sun May 22 01:07:54 2011 (r222167) @@ -4405,7 +4405,7 @@ fhopen(td, uap) return (ESTALE); vfslocked = VFS_LOCK_GIANT(mp); /* now give me my vnode, it gets returned to me locked */ - error = VFS_FHTOVP(mp, &fhp.fh_fid, &vp); + error = VFS_FHTOVP(mp, &fhp.fh_fid, LK_EXCLUSIVE, &vp); vfs_unbusy(mp); if (error) goto out; @@ -4581,7 +4581,7 @@ fhstat(td, uap) if ((mp = vfs_busyfs(&fh.fh_fsid)) == NULL) return (ESTALE); vfslocked = VFS_LOCK_GIANT(mp); - error = VFS_FHTOVP(mp, &fh.fh_fid, &vp); + error = VFS_FHTOVP(mp, &fh.fh_fid, LK_EXCLUSIVE, &vp); vfs_unbusy(mp); if (error) { VFS_UNLOCK_GIANT(vfslocked); @@ -4641,7 +4641,7 @@ kern_fhstatfs(struct thread *td, fhandle if ((mp = vfs_busyfs(&fh.fh_fsid)) == NULL) return (ESTALE); vfslocked = VFS_LOCK_GIANT(mp); - error = VFS_FHTOVP(mp, &fh.fh_fid, &vp); + error = VFS_FHTOVP(mp, &fh.fh_fid, LK_EXCLUSIVE, &vp); if (error) { vfs_unbusy(mp); VFS_UNLOCK_GIANT(vfslocked); Modified: head/sys/nfsserver/nfs_srvsubs.c ============================================================================== --- head/sys/nfsserver/nfs_srvsubs.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/nfsserver/nfs_srvsubs.c Sun May 22 01:07:54 2011 (r222167) @@ -1128,7 +1128,7 @@ nfsrv_fhtovp(fhandle_t *fhp, int flags, goto out; } } - error = VFS_FHTOVP(mp, &fhp->fh_fid, vpp); + error = VFS_FHTOVP(mp, &fhp->fh_fid, LK_EXCLUSIVE, vpp); if (error) { /* Make sure the server replies ESTALE to the client. */ error = ESTALE; Modified: head/sys/nlm/nlm_prot_impl.c ============================================================================== --- head/sys/nlm/nlm_prot_impl.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/nlm/nlm_prot_impl.c Sun May 22 01:07:54 2011 (r222167) @@ -1797,7 +1797,7 @@ nlm_get_vfs_state(struct nlm_host *host, goto out; } - error = VFS_FHTOVP(vs->vs_mp, &fhp->fh_fid, &vs->vs_vp); + error = VFS_FHTOVP(vs->vs_mp, &fhp->fh_fid, LK_EXCLUSIVE, &vs->vs_vp); if (error) goto out; vs->vs_vnlocked = TRUE; Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Sat May 21 22:53:56 2011 (r222166) +++ head/sys/sys/mount.h Sun May 22 01:07:54 2011 (r222167) @@ -566,7 +566,8 @@ typedef int vfs_statfs_t(struct mount *m typedef int vfs_sync_t(struct mount *mp, int waitfor); typedef int vfs_vget_t(struct mount *mp, ino_t ino, int flags, struct vnode **vpp); -typedef int vfs_fhtovp_t(struct mount *mp, struct fid *fhp, struct vnode **vpp); +typedef int vfs_fhtovp_t(struct mount *mp, struct fid *fhp, + int flags, struct vnode **vpp); typedef int vfs_checkexp_t(struct mount *mp, struct sockaddr *nam, int *extflagsp, struct ucred **credanonp, int *numsecflavors, int **secflavors); @@ -610,8 +611,8 @@ vfs_statfs_t __vfs_statfs; #define VFS_SYNC(MP, WAIT) (*(MP)->mnt_op->vfs_sync)(MP, WAIT) #define VFS_VGET(MP, INO, FLAGS, VPP) \ (*(MP)->mnt_op->vfs_vget)(MP, INO, FLAGS, VPP) -#define VFS_FHTOVP(MP, FIDP, VPP) \ - (*(MP)->mnt_op->vfs_fhtovp)(MP, FIDP, VPP) +#define VFS_FHTOVP(MP, FIDP, FLAGS, VPP) \ + (*(MP)->mnt_op->vfs_fhtovp)(MP, FIDP, FLAGS, VPP) #define VFS_CHECKEXP(MP, NAM, EXFLG, CRED, NUMSEC, SEC) \ (*(MP)->mnt_op->vfs_checkexp)(MP, NAM, EXFLG, CRED, NUMSEC, SEC) #define VFS_EXTATTRCTL(MP, C, FN, NS, N) \ Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sat May 21 22:53:56 2011 (r222166) +++ head/sys/sys/param.h Sun May 22 01:07:54 2011 (r222167) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 900037 /* Master, propagated to newvers */ +#define __FreeBSD_version 900038 /* Master, propagated to newvers */ #ifdef _KERNEL #define P_OSREL_SIGSEGV 700004 Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/ufs/ffs/ffs_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -1640,9 +1640,10 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags * those rights via. exflagsp and credanonp */ static int -ffs_fhtovp(mp, fhp, vpp) +ffs_fhtovp(mp, fhp, flags, vpp) struct mount *mp; struct fid *fhp; + int flags; struct vnode **vpp; { struct ufid *ufhp; @@ -1653,7 +1654,7 @@ ffs_fhtovp(mp, fhp, vpp) if (ufhp->ufid_ino < ROOTINO || ufhp->ufid_ino >= fs->fs_ncg * fs->fs_ipg) return (ESTALE); - return (ufs_fhtovp(mp, ufhp, vpp)); + return (ufs_fhtovp(mp, ufhp, flags, vpp)); } /* Modified: head/sys/ufs/ufs/ufs_extern.h ============================================================================== --- head/sys/ufs/ufs/ufs_extern.h Sat May 21 22:53:56 2011 (r222166) +++ head/sys/ufs/ufs/ufs_extern.h Sun May 22 01:07:54 2011 (r222167) @@ -56,7 +56,7 @@ extern struct vop_vector ufs_vnodeops; int ufs_bmap(struct vop_bmap_args *); int ufs_bmaparray(struct vnode *, ufs2_daddr_t, ufs2_daddr_t *, struct buf *, int *, int *); -int ufs_fhtovp(struct mount *, struct ufid *, struct vnode **); +int ufs_fhtovp(struct mount *, struct ufid *, int, struct vnode **); int ufs_checkpath(ino_t, ino_t, struct inode *, struct ucred *, ino_t *); void ufs_dirbad(struct inode *, doff_t, char *); int ufs_dirbadentry(struct vnode *, struct direct *, int); Modified: head/sys/ufs/ufs/ufs_vfsops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vfsops.c Sat May 21 22:53:56 2011 (r222166) +++ head/sys/ufs/ufs/ufs_vfsops.c Sun May 22 01:07:54 2011 (r222167) @@ -208,9 +208,10 @@ ufs_uninit(vfsp) * Call the VFS_CHECKEXP beforehand to verify access. */ int -ufs_fhtovp(mp, ufhp, vpp) +ufs_fhtovp(mp, ufhp, flags, vpp) struct mount *mp; struct ufid *ufhp; + int flags; struct vnode **vpp; { struct inode *ip; From owner-svn-src-all@FreeBSD.ORG Sun May 22 04:38:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9292F106566B; Sun, 22 May 2011 04:38:34 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 18D808FC0C; Sun, 22 May 2011 04:38:34 +0000 (UTC) Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p4M4a9pE085732 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sat, 21 May 2011 22:36:11 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <4DD80A22.3090300@FreeBSD.org> Date: Sat, 21 May 2011 22:36:09 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201105201703.p4KH3NrR093036@svn.freebsd.org> <4DD80A22.3090300@FreeBSD.org> To: Doug Barton X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sat, 21 May 2011 22:36:11 -0600 (MDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Sergey Kandaurov , src-committers@freebsd.org Subject: Re: svn commit: r222136 - head/usr.bin/top X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 04:38:34 -0000 On May 21, 2011, at 12:53 PM, Doug Barton wrote: > On 05/20/2011 10:09, Sergey Kandaurov wrote: >> There's still a lot of warnings but all of them reside in contrib = part. >=20 > That doesn't mean that they shouldn't be fixed. :) The great thing = about the way that the contrib sources are arranged in svn is that we = can fix things in src/contrib with no concern to any "costs" imposed by = the VCS. Except when they appear to break arm :( Remember people: make universe = (or make tinderbox) is *REQUIRED* to run cleanly when making warning = fixes. Warner From owner-svn-src-all@FreeBSD.ORG Sun May 22 08:58:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C971106566C; Sun, 22 May 2011 08:58:14 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 838EA8FC0A; Sun, 22 May 2011 08:58:13 +0000 (UTC) Received: by gyg13 with SMTP id 13so2248515gyg.13 for ; Sun, 22 May 2011 01:58:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=1GdsAvkOe4OGNZQdb91YIIqMe2v+0nHvL/6pu/gjY7c=; b=kD6kurqzy+f7uSiiCLoq8rPJ/4aGoYghA1mwK72ftCmJPb7ZUodRJHVSdvZvqY9BV2 uLChT+B45jpXYd71vuE/jPPPO6dUn7uJykkthepIIvCyt/G7ycwwmxi8opFOg1LeEsAi pzgDONg50Cc+nHm8Yt3+qFh5Vf7Leh1lX1FSg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=qTQDvPS2wk1YRBvIOwpIMq+NJTJyKj7NJMTbP3X7Fqw261/HH0DEpw+qqd5jRBrNSN h9MMvPhSMQ6oCjH6SPD+b2pVZJI9SbGMFuc/VtT8KbIvPEvAaWhPRj8iHOJo0V9SkSEX gUhX6bMLorfuTIvbNIDyPuGIWA2qeWK1Hx2iA= MIME-Version: 1.0 Received: by 10.150.198.16 with SMTP id v16mr1690997ybf.190.1306054692679; Sun, 22 May 2011 01:58:12 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.150.91.12 with HTTP; Sun, 22 May 2011 01:58:12 -0700 (PDT) In-Reply-To: References: <201011121302.oACD2Qjt009385@svn.freebsd.org> Date: Sun, 22 May 2011 16:58:12 +0800 X-Google-Sender-Auth: gfTPKz9xgsAwKpud7gcGVyrOllM Message-ID: From: Adrian Chadd To: Ivan Voras Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r215178 - in head: lib/libc/sys sys/kern sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 08:58:14 -0000 On 15 November 2010 19:56, Ivan Voras wrote: > While at it, why not intptr_t? It would be marginally more useful and > almost free. Because it can lead to code choices that use the whole 64 bit space for something other than a single 32 bit integer (say, four 16 bit words all packed together) which suddenly finds itself breaking on 32 bit platforms. Not that any fine FreeBSD programmers would make such a mistake. :) I agree with Luigi. Adrian From owner-svn-src-all@FreeBSD.ORG Sun May 22 09:29:39 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 989B0106566C; Sun, 22 May 2011 09:29:39 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 2D1ED8FC0C; Sun, 22 May 2011 09:29:39 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id p4M9TbDY006445 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 22 May 2011 11:29:38 +0200 (CEST) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1306056578; bh=46ZwIAKUCpzKV6aKqJrWJ14MyURWw+8qn9arX6iSW24=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=XYGxLKrtyPTCYmnTBqORcTctV1KMm+xjSSiLnLCaZTW5VZGH+KYp5KcXCRp1BeZLZ tsKq4Dte1TFHFWYP/oZ6SlqeCqpFr58uF5KRbQmgG3qX4TQgJMYDUMH4FAr/gVsDVq 4CBaN+fY9EU2qv7OpKF+/SRR8yApvc4cCfrjNXQU= Date: Sun, 22 May 2011 11:29:37 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Edwin Groothuis Message-ID: <20110522092937.GS31223@acme.spoerlein.net> Mail-Followup-To: Ulrich =?utf-8?B?U3DDtnJsZWlu?= , Edwin Groothuis , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201105191309.p4JD9dXY038734@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201105191309.p4JD9dXY038734@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r222094 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 09:29:39 -0000 On Thu, 19.05.2011 at 13:09:39 +0000, Edwin Groothuis wrote: > Author: edwin > Date: Thu May 19 13:09:39 2011 > New Revision: 222094 > URL: http://svn.freebsd.org/changeset/base/222094 > > Log: > Put AN back after finding out that tzsetup(1) will complain that > it doesn't exist. It will be removed again once the tzdata distribution > files have been updated with the replacements for AN. Wouldn't it be better to have tzsetup use iso3166.tab from the tzdata distribution, which is mostly guaranteed to be in sync with zone.tab? Uli From owner-svn-src-all@FreeBSD.ORG Sun May 22 09:48:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7F0F106566C; Sun, 22 May 2011 09:48:25 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E5478FC0A; Sun, 22 May 2011 09:48:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4M9mPwv068193; Sun, 22 May 2011 09:48:25 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4M9mP2m068191; Sun, 22 May 2011 09:48:25 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201105220948.p4M9mP2m068191@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 22 May 2011 09:48:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222171 - head/tools/tools/iso X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 09:48:25 -0000 Author: uqs Date: Sun May 22 09:48:25 2011 New Revision: 222171 URL: http://svn.freebsd.org/changeset/base/222171 Log: Update URLs and fix regex to work with current version of the files. Modified: head/tools/tools/iso/check-iso3166.pl Modified: head/tools/tools/iso/check-iso3166.pl ============================================================================== --- head/tools/tools/iso/check-iso3166.pl Sun May 22 03:18:25 2011 (r222170) +++ head/tools/tools/iso/check-iso3166.pl Sun May 22 09:48:25 2011 (r222171) @@ -4,8 +4,8 @@ # $FreeBSD$ # # This script compares the file iso3166 (from head/share/misc) with the files -# list-en1-semic-2.txt (from -# http://www.iso.org/iso/list-en1-semic-2.txt) and iso3166-countrycodes.txt +# list-en1-semic-3.txt (from +# http://www.iso.org/iso/list-en1-semic-3.txt) and iso3166-countrycodes.txt # (from ftp://ftp.ripe.net/) to see if there any differences. # # Created by Edwin Groothuis for the FreeBSD project. @@ -41,7 +41,7 @@ my %old = (); my %new1 = (); { - open(FIN, "iso3166-countrycodes.txt") or die "Cannot open iso3166-countrycodes.txt, which can be retrieved from ftp://ftp.ripe.net/"; + open(FIN, "iso3166-countrycodes.txt") or die "Cannot open iso3166-countrycodes.txt, which can be retrieved from ftp://ftp.ripe.net/iso3166-countrycodes.txt"; my @lines = ; close(FIN); chomp(@lines); @@ -56,7 +56,7 @@ my %new1 = (); next if ($l eq ""); die "Invalid line: $l\n" - if ($l !~ /^(.+?)[\t ][\t ]+([A-Z]{2})[\t ]+([A-Z]{3})[\t ]+(\d+)[\t ]*$/); + if ($l !~ /^(.+?)[\t ]+([A-Z]{2})[\t ]+([A-Z]{3})[\t ]+(\d+)[\t ]*$/); my $two = $2; my $three = $3; my $number = $4; @@ -71,7 +71,7 @@ my %new1 = (); my %new2 = (); { - open(FIN, "list-en1-semic-2.txt") or die "Cannot open list-en1-semic-2.txt, which can be retrieved from http://www.iso.org/iso/list-en1-semic-2.txt"; + open(FIN, "list-en1-semic-3.txt") or die "Cannot open list-en1-semic-3.txt, which can be retrieved from http://www.iso.org/iso/list-en1-semic-3.txt"; my @lines = ; close(FIN); chomp(@lines); From owner-svn-src-all@FreeBSD.ORG Sun May 22 09:49:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C8951065670; Sun, 22 May 2011 09:49:43 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from fep24.mx.upcmail.net (fep24.mx.upcmail.net [62.179.121.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2B23C8FC14; Sun, 22 May 2011 09:49:41 +0000 (UTC) Received: from edge03.upcmail.net ([192.168.13.238]) by viefep16-int.chello.at (InterMail vM.8.01.02.02 201-2260-120-106-20100312) with ESMTP id <20110522093305.GNY29314.viefep16-int.chello.at@edge03.upcmail.net>; Sun, 22 May 2011 11:33:05 +0200 Received: from mole.fafoe.narf.at ([213.47.85.26]) by edge03.upcmail.net with edge id mZZ41g0130a5KZh03ZZ5r1; Sun, 22 May 2011 11:33:05 +0200 X-SourceIP: 213.47.85.26 Received: by mole.fafoe.narf.at (Postfix, from userid 1001) id 10AC26D41F; Sun, 22 May 2011 11:33:04 +0200 (CEST) Date: Sun, 22 May 2011 11:33:03 +0200 From: Stefan Farfeleder To: "Andrey V. Elsukov" Message-ID: <20110522093302.GA2638@mole.fafoe.narf.at> References: <201105152003.p4FK3tnS050889@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201105152003.p4FK3tnS050889@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Cloudmark-Analysis: v=1.1 cv=zlRBWuFCZaNL9+WHNm1pWLowY5Lx061w2zJBJiDkNAU= c=1 sm=0 a=wom5GMh1gUkA:10 a=E7XHod5se7kA:10 a=dBRESv0yCI8A:10 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=NXWmQLDIsIibcRWPP7kA:9 a=CjuIK1q_8ugA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 09:49:43 -0000 On Sun, May 15, 2011 at 08:03:55PM +0000, Andrey V. Elsukov wrote: > Author: ae > Date: Sun May 15 20:03:54 2011 > New Revision: 221972 > URL: http://svn.freebsd.org/changeset/base/221972 > > Log: > Add a sysctl kern.geom.part.check_integrity for those who has corrupt > partition tables and lost an ability to boot after r221788. > Also unhide an error message from bootverbose, this would help to > easier determine the problem. So, what's the point of this check? It breaks mounting of all my USB drives. Everyone now has to set this sysctl? da0 at umass-sim0 bus 0 scbus6 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 15304MB (31342592 512 byte sectors: 255H 63S/T 1950C) GEOM_PART: integrity check failed (da0, MBR) Stefan From owner-svn-src-all@FreeBSD.ORG Sun May 22 09:58:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4ABC6106566B; Sun, 22 May 2011 09:58:49 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3AEF98FC0A; Sun, 22 May 2011 09:58:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4M9wn2Z068535; Sun, 22 May 2011 09:58:49 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4M9wnwf068533; Sun, 22 May 2011 09:58:49 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201105220958.p4M9wnwf068533@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 22 May 2011 09:58:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222172 - head/sys/gnu/fs/xfs/FreeBSD/support X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 09:58:49 -0000 Author: uqs Date: Sun May 22 09:58:48 2011 New Revision: 222172 URL: http://svn.freebsd.org/changeset/base/222172 Log: Fix typo in unused function name Submitted by: arundel Modified: head/sys/gnu/fs/xfs/FreeBSD/support/kdb.c Modified: head/sys/gnu/fs/xfs/FreeBSD/support/kdb.c ============================================================================== --- head/sys/gnu/fs/xfs/FreeBSD/support/kdb.c Sun May 22 09:48:25 2011 (r222171) +++ head/sys/gnu/fs/xfs/FreeBSD/support/kdb.c Sun May 22 09:58:48 2011 (r222172) @@ -56,7 +56,7 @@ kdb_getarea_size(void *res, unsigned lon } int -db_putarea_size(unsigned long addr, void *res, size_t size) +kdb_putarea_size(unsigned long addr, void *res, size_t size) { return 0; } From owner-svn-src-all@FreeBSD.ORG Sun May 22 10:41:38 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D7DA106566B; Sun, 22 May 2011 10:41:38 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: from mail4out.barnet.com.au (mail4out.barnet.com.au [202.83.178.123]) by mx1.freebsd.org (Postfix) with ESMTP id 0891C8FC0C; Sun, 22 May 2011 10:41:37 +0000 (UTC) Received: by mail4out.barnet.com.au (Postfix, from userid 1001) id EFB1737BAD7; Sun, 22 May 2011 20:16:49 +1000 (EST) X-Viruscan-Id: <4DD8E291000141025A98A4@BarNet> Received: from mail4auth.barnet.com.au (mail4.barnet.com.au [202.83.178.125]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.barnet.com.au", Issuer "Equifax" (verified OK)) by mail4.barnet.com.au (Postfix) with ESMTPS id 99DBB4222AE; Sun, 22 May 2011 20:16:49 +1000 (EST) Received: from [10.204.250.208] (ppp121-45-190-113.lns6.syd7.internode.on.net [121.45.190.113]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client did not present a certificate) by mail4auth.barnet.com.au (Postfix) with ESMTPSA id 3F44237B984; Sun, 22 May 2011 20:16:49 +1000 (EST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=iso-8859-1 From: Edwin Groothuis In-Reply-To: <20110522092937.GS31223@acme.spoerlein.net> Date: Sun, 22 May 2011 20:16:47 +1000 Content-Transfer-Encoding: quoted-printable Message-Id: <3AA8EEBF-4C35-41A3-9516-09044CADAD0C@mavetju.org> References: <201105191309.p4JD9dXY038734@svn.freebsd.org> <20110522092937.GS31223@acme.spoerlein.net> To: =?iso-8859-1?Q?Ulrich_Sp=F6rlein?= X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r222094 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 10:41:38 -0000 On 22/05/2011, at 7:29 PM, Ulrich Sp=F6rlein wrote: > On Thu, 19.05.2011 at 13:09:39 +0000, Edwin Groothuis wrote: >> Author: edwin >> Date: Thu May 19 13:09:39 2011 >> New Revision: 222094 >> URL: http://svn.freebsd.org/changeset/base/222094 >>=20 >> Log: >> Put AN back after finding out that tzsetup(1) will complain that >> it doesn't exist. It will be removed again once the tzdata = distribution >> files have been updated with the replacements for AN. >=20 > Wouldn't it be better to have tzsetup use iso3166.tab from the tzdata > distribution, which is mostly guaranteed to be in sync with zone.tab? Which opens a different can of worms. Duplicate file, with semi-similar contents. Whenever there are changes in the distribution of the tzdata iso3166.tab = equivalent file, I check if they are in the /usr/share/misc equivalent = file. A warning to that file should be added that tzsetup uses it and that = they always should check tzsetup functionality before commiting it. Edwin= From owner-svn-src-all@FreeBSD.ORG Sun May 22 12:12:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85A14106564A; Sun, 22 May 2011 12:12:28 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 75D308FC08; Sun, 22 May 2011 12:12:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MCCSnh073814; Sun, 22 May 2011 12:12:28 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MCCSCn073812; Sun, 22 May 2011 12:12:28 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105221212.p4MCCSCn073812@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 22 May 2011 12:12:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222173 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 12:12:28 -0000 Author: jilles Date: Sun May 22 12:12:28 2011 New Revision: 222173 URL: http://svn.freebsd.org/changeset/base/222173 Log: sh: Fix bss-based buffer overflow in . builtin. If the length of a directory in PATH together with the given filename exceeded FILENAME_MAX (which may happen even for pathnames that work), a static buffer was overflown. The static buffer is unnecessary, we can use the stalloc() stack. Obtained from: NetBSD MFC after: 1 week Modified: head/bin/sh/main.c Modified: head/bin/sh/main.c ============================================================================== --- head/bin/sh/main.c Sun May 22 09:58:48 2011 (r222172) +++ head/bin/sh/main.c Sun May 22 12:12:28 2011 (r222173) @@ -281,7 +281,6 @@ readcmdfile(const char *name) static char * find_dot_file(char *basename) { - static char localname[FILENAME_MAX+1]; char *fullname; const char *path = pathval(); struct stat statb; @@ -291,10 +290,14 @@ find_dot_file(char *basename) return basename; while ((fullname = padvance(&path, basename)) != NULL) { - strcpy(localname, fullname); + if ((stat(fullname, &statb) == 0) && S_ISREG(statb.st_mode)) { + /* + * Don't bother freeing here, since it will + * be freed by the caller. + */ + return fullname; + } stunalloc(fullname); - if ((stat(fullname, &statb) == 0) && S_ISREG(statb.st_mode)) - return localname; } return basename; } From owner-svn-src-all@FreeBSD.ORG Sun May 22 12:15:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6814F106564A; Sun, 22 May 2011 12:15:14 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 582948FC08; Sun, 22 May 2011 12:15:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MCFE56073929; Sun, 22 May 2011 12:15:14 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MCFEXN073928; Sun, 22 May 2011 12:15:14 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105221215.p4MCFEXN073928@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 22 May 2011 12:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222174 - head/tools/regression/bin/sh/builtins X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 12:15:14 -0000 Author: jilles Date: Sun May 22 12:15:14 2011 New Revision: 222174 URL: http://svn.freebsd.org/changeset/base/222174 Log: sh: Add test for r222173. Added: head/tools/regression/bin/sh/builtins/dot4.0 (contents, props changed) Added: head/tools/regression/bin/sh/builtins/dot4.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/dot4.0 Sun May 22 12:15:14 2011 (r222174) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +v=abcd +v=$v$v$v$v +v=$v$v$v$v +v=$v$v$v$v +v=$v$v$v$v +v=$v$v$v$v +r=$( ( + trap 'exit 0' 0 + . "$v" +) 2>&1 >/dev/null) && [ -n "$r" ] From owner-svn-src-all@FreeBSD.ORG Sun May 22 13:03:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4154A106564A; Sun, 22 May 2011 13:03:41 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id C62C68FC12; Sun, 22 May 2011 13:03:40 +0000 (UTC) Received: by gxk28 with SMTP id 28so2295077gxk.13 for ; Sun, 22 May 2011 06:03:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=lJMve+KAWDhSpIH8y+zJORRoG6CdKfyVxCNMiXszjNA=; b=dSXQVoqO8VV2UkC4IQ6kybo3ISb+gJhFepyBpRYL3YEbWZTrSS5Cqc9uZcH/YRWqH1 K9FCCkNDwk/A3QsDaYREhAn+W72SGTk6R7n3AbzVNllrY5hzY37jTT57p+kvBP38JTWS 3EbdLjo2vVxzABEmY+V7ywRqA4dLMlaUa8ViQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=TmDYasF6+15Ckq7gf6WWG4YOSXaVA7tZlNh7NjY8i6wyV23tnztkccauex3QyRTSWj iVDpYQaXgPtDuZDueZMTuYS8GwGVz21KYMlOO+ygadDEL4m5clHR4mrG51VWa+aVz2qg +qJuLp9CYfn9XuWRm8ScK8Ip2cAkrTthkH7P0= MIME-Version: 1.0 Received: by 10.150.198.16 with SMTP id v16mr1831764ybf.190.1306069419879; Sun, 22 May 2011 06:03:39 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.150.91.12 with HTTP; Sun, 22 May 2011 06:03:39 -0700 (PDT) In-Reply-To: <20110522093302.GA2638@mole.fafoe.narf.at> References: <201105152003.p4FK3tnS050889@svn.freebsd.org> <20110522093302.GA2638@mole.fafoe.narf.at> Date: Sun, 22 May 2011 21:03:39 +0800 X-Google-Sender-Auth: jqYuKZPprUoZHMIv3K5xUz1OMn0 Message-ID: From: Adrian Chadd To: Stefan Farfeleder Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, "Andrey V. Elsukov" , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 13:03:41 -0000 This also bit me on embedded platform stuff. Is it possible to disable this by default for now and have it just warn lou= dly? And/or hide the default value behind a kernel configuration variable so we can disable it (but still get the warnings) for now? Thanks, Adrian On 22 May 2011 17:33, Stefan Farfeleder wrote: > On Sun, May 15, 2011 at 08:03:55PM +0000, Andrey V. Elsukov wrote: >> Author: ae >> Date: Sun May 15 20:03:54 2011 >> New Revision: 221972 >> URL: http://svn.freebsd.org/changeset/base/221972 >> >> Log: >> =A0 Add a sysctl kern.geom.part.check_integrity for those who has corrup= t >> =A0 partition tables and lost an ability to boot after r221788. >> =A0 Also unhide an error message from bootverbose, this would help to >> =A0 easier determine the problem. > > So, what's the point of this check? It breaks mounting of all my USB > drives. =A0Everyone now has to set this sysctl? > > da0 at umass-sim0 bus 0 scbus6 target 0 lun 0 > da0: Removable Direct Access SCSI-0 device > da0: 40.000MB/s transfers > da0: 15304MB (31342592 512 byte sectors: 255H 63S/T 1950C) > GEOM_PART: integrity check failed (da0, MBR) > > Stefan > From owner-svn-src-all@FreeBSD.ORG Sun May 22 14:03:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E03D1065675; Sun, 22 May 2011 14:03:21 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 535118FC16; Sun, 22 May 2011 14:03:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4ME3LPh077092; Sun, 22 May 2011 14:03:21 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4ME3L91077090; Sun, 22 May 2011 14:03:21 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201105221403.p4ME3L91077090@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 22 May 2011 14:03:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222175 - head/share/examples/libvgl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 14:03:21 -0000 Author: uqs Date: Sun May 22 14:03:21 2011 New Revision: 222175 URL: http://svn.freebsd.org/changeset/base/222175 Log: Remove typos, tabs-after-spaces and EOL whitespace. Convert to UTF-8. Modified: head/share/examples/libvgl/demo.c Modified: head/share/examples/libvgl/demo.c ============================================================================== --- head/share/examples/libvgl/demo.c Sun May 22 12:15:14 2011 (r222174) +++ head/share/examples/libvgl/demo.c Sun May 22 14:03:21 2011 (r222175) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1991-1997 Søren Schmidt + * Copyright (c) 1991-1997 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,15 +42,15 @@ main(int argc, char **argv) // set graphics mode, here 320x240 256 colors // supported modes are (from ): - // SW_VGA_CG320: std VGA 320x200 256 colors - // SW_VGA_MODEX: Modex VGA 320x240 256 colors - // SW_VGA_VG640: std VGA 640x480 16 colors + // SW_VGA_CG320: std VGA 320x200 256 colors + // SW_VGA_MODEX: Modex VGA 320x240 256 colors + // SW_VGA_VG640: std VGA 640x480 16 colors VGLInit(SW_VGA_MODEX); // initialize mouse and show pointer VGLMouseInit(VGL_MOUSESHOW); - // VGLDisplay is a ptr to a struct Bitmap defined and initialized by + // VGLDisplay is a ptr to a struct Bitmap defined and initialized by // libvgl. The Bitmap points directly to screen memory etc. xsize=VGLDisplay->Xsize; ysize=VGLDisplay->Ysize; @@ -61,7 +61,7 @@ main(int argc, char **argv) VGLClear(tmp, 0); // fill the screen with colored lines - for (y=0; yBitmap[i+256*j] = i%16; @@ -106,12 +106,12 @@ main(int argc, char **argv) // loop around drawing and copying while (++i) { VGLBitmapCopy(VGLDisplay, rand()%xsize, rand()%ysize, - VGLDisplay, rand()%xsize, rand()%ysize, - rand()%xsize, rand()%ysize); + VGLDisplay, rand()%xsize, rand()%ysize, + rand()%xsize, rand()%ysize); VGLLine(VGLDisplay, rand()%xsize, rand()%ysize, rand()%xsize, rand()%ysize, rand()%256); VGLEllipse(VGLDisplay, rand()%xsize, rand()%ysize, - rand()%xsize/2, rand()%ysize/2, rand()%256); + rand()%xsize/2, rand()%ysize/2, rand()%256); rand(); if (i > 1000) break; } @@ -120,4 +120,3 @@ main(int argc, char **argv) VGLEnd(); return 0; } - From owner-svn-src-all@FreeBSD.ORG Sun May 22 14:03:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DED60106564A; Sun, 22 May 2011 14:03:30 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC8E48FC0A; Sun, 22 May 2011 14:03:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4ME3Udr077149; Sun, 22 May 2011 14:03:30 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4ME3Uj2077132; Sun, 22 May 2011 14:03:30 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201105221403.p4ME3Uj2077132@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 22 May 2011 14:03:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222176 - in head: sbin/atacontrol sbin/mount_reiserfs share/man/man4 share/man/man5 share/man/man9 share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 14:03:31 -0000 Author: uqs Date: Sun May 22 14:03:30 2011 New Revision: 222176 URL: http://svn.freebsd.org/changeset/base/222176 Log: Re-encode files from ISO-8859-1 to UTF-8 Modified: head/sbin/atacontrol/atacontrol.8 head/sbin/atacontrol/atacontrol.c head/sbin/mount_reiserfs/mount_reiserfs.8 head/sbin/mount_reiserfs/mount_reiserfs.c head/share/man/man4/aio.4 head/share/man/man4/ata.4 head/share/man/man4/coretemp.4 head/share/man/man4/ichwd.4 head/share/man/man4/pst.4 head/share/man/man4/ucycom.4 head/share/man/man5/reiserfs.5 head/share/man/man9/LOCK_PROFILING.9 head/share/man/man9/pseudofs.9 head/share/man/man9/sbuf.9 head/share/man/man9/zone.9 head/share/misc/bsd-family-tree Modified: head/sbin/atacontrol/atacontrol.8 ============================================================================== --- head/sbin/atacontrol/atacontrol.8 Sun May 22 14:03:21 2011 (r222175) +++ head/sbin/atacontrol/atacontrol.8 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2000,2001,2002 Søren Schmidt +.\" Copyright (c) 2000,2001,2002 Søren Schmidt .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/sbin/atacontrol/atacontrol.c ============================================================================== --- head/sbin/atacontrol/atacontrol.c Sun May 22 14:03:21 2011 (r222175) +++ head/sbin/atacontrol/atacontrol.c Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000 - 2006 Søren Schmidt + * Copyright (c) 2000 - 2006 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sbin/mount_reiserfs/mount_reiserfs.8 ============================================================================== --- head/sbin/mount_reiserfs/mount_reiserfs.8 Sun May 22 14:03:21 2011 (r222175) +++ head/sbin/mount_reiserfs/mount_reiserfs.8 Sun May 22 14:03:30 2011 (r222176) @@ -1,7 +1,7 @@ .\" .\" Copyright (c) 1993,1994 Christopher G. Demetriou .\" Copyright (c) 1999 Semen Ustimenko -.\" Copyright (c) 2005 Jean-Sébastien Pédron +.\" Copyright (c) 2005 Jean-Sébastien Pédron .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/sbin/mount_reiserfs/mount_reiserfs.c ============================================================================== --- head/sbin/mount_reiserfs/mount_reiserfs.c Sun May 22 14:03:21 2011 (r222175) +++ head/sbin/mount_reiserfs/mount_reiserfs.c Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005 Jean-Sébastien Pédron + * Copyright (c) 2005 Jean-Sébastien Pédron * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/share/man/man4/aio.4 ============================================================================== --- head/share/man/man4/aio.4 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man4/aio.4 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2002 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2002 Dag-Erling Coïdan Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/man/man4/ata.4 ============================================================================== --- head/share/man/man4/ata.4 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man4/ata.4 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2003 Søren Schmidt +.\" Copyright (c) 2003 Søren Schmidt .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/man/man4/coretemp.4 ============================================================================== --- head/share/man/man4/coretemp.4 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man4/coretemp.4 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2007 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2007 Dag-Erling Coïdan Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/man/man4/ichwd.4 ============================================================================== --- head/share/man/man4/ichwd.4 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man4/ichwd.4 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2007 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2007 Dag-Erling Coïdan Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/man/man4/pst.4 ============================================================================== --- head/share/man/man4/pst.4 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man4/pst.4 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2001,2002 Søren Schmidt +.\" Copyright (c) 2001,2002 Søren Schmidt .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/man/man4/ucycom.4 ============================================================================== --- head/share/man/man4/ucycom.4 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man4/ucycom.4 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2004 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2004 Dag-Erling Coïdan Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/man/man5/reiserfs.5 ============================================================================== --- head/share/man/man5/reiserfs.5 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man5/reiserfs.5 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2005 Jean-Sébastien Pédron +.\" Copyright (c) 2005 Jean-Sébastien Pédron .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/man/man9/LOCK_PROFILING.9 ============================================================================== --- head/share/man/man9/LOCK_PROFILING.9 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man9/LOCK_PROFILING.9 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2004 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2004 Dag-Erling Coïdan Smørgrav .\" Copyright (c) 2005 Robert N. M. Watson .\" Copyright (c) 2006 Kip Macy .\" All rights reserved. Modified: head/share/man/man9/pseudofs.9 ============================================================================== --- head/share/man/man9/pseudofs.9 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man9/pseudofs.9 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2001 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2001 Dag-Erling Coïdan Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/man/man9/sbuf.9 ============================================================================== --- head/share/man/man9/sbuf.9 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man9/sbuf.9 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2000 Poul-Henning Kamp and Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2000 Poul-Henning Kamp and Dag-Erling Coïdan Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/man/man9/zone.9 ============================================================================== --- head/share/man/man9/zone.9 Sun May 22 14:03:21 2011 (r222175) +++ head/share/man/man9/zone.9 Sun May 22 14:03:30 2011 (r222176) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2001 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2001 Dag-Erling Coïdan Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Sun May 22 14:03:21 2011 (r222175) +++ head/share/misc/bsd-family-tree Sun May 22 14:03:30 2011 (r222176) @@ -562,7 +562,7 @@ Australian Computer Society, Hobart, Aug Peter H. Salus. Unix at 25. Byte Magazine, October 1994. URL: http://www.byte.com/art/9410/sec8/art3.htm -Andreas Klemm, Lars Köller. If you're going to San Francisco ... +Andreas Klemm, Lars Köller. If you're going to San Francisco ... Die freien BSD-Varianten von Unix. c't April 1997, page 368ff. BSD Release Announcements collection. From owner-svn-src-all@FreeBSD.ORG Sun May 22 14:03:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC2A51065692; Sun, 22 May 2011 14:03:38 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB52C8FC0C; Sun, 22 May 2011 14:03:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4ME3coN077200; Sun, 22 May 2011 14:03:38 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4ME3cAR077187; Sun, 22 May 2011 14:03:38 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201105221403.p4ME3cAR077187@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 22 May 2011 14:03:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222177 - head/bin/pax X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 14:03:39 -0000 Author: uqs Date: Sun May 22 14:03:38 2011 New Revision: 222177 URL: http://svn.freebsd.org/changeset/base/222177 Log: Fix a bunch of typos and a couple of whitespace nits. Helped by: codespell and vim's spellchecker Modified: head/bin/pax/ar_io.c head/bin/pax/ar_subs.c head/bin/pax/buf_subs.c head/bin/pax/cpio.c head/bin/pax/file_subs.c head/bin/pax/ftree.c head/bin/pax/options.c head/bin/pax/pat_rep.c head/bin/pax/pax.c head/bin/pax/sel_subs.c head/bin/pax/tables.c head/bin/pax/tar.c Modified: head/bin/pax/ar_io.c ============================================================================== --- head/bin/pax/ar_io.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/ar_io.c Sun May 22 14:03:38 2011 (r222177) @@ -204,7 +204,7 @@ ar_open(const char *name) /* * set default blksz on read. APPNDs writes rdblksz on the last volume * On all new archive volumes, we shift to wrblksz (if the user - * specified one, otherwize we will continue to use rdblksz). We + * specified one, otherwise we will continue to use rdblksz). We * must to set blocksize based on what kind of device the archive is * stored. */ @@ -381,7 +381,7 @@ ar_close(void) /* * If we have not determined the format yet, we just say how many bytes - * we have skipped over looking for a header to id. there is no way we + * we have skipped over looking for a header to id. There is no way we * could have written anything yet. */ if (frmt == NULL) { @@ -595,7 +595,7 @@ ar_read(char *buf, int cnt) * Return: * Number of bytes written. 0 indicates end of volume reached and with no * flaws (as best that can be detected). A -1 indicates an unrecoverable - * error in the archive occured. + * error in the archive occurred. */ int @@ -679,7 +679,7 @@ ar_write(char *buf, int bsz) * if this is a block aligned archive format, we may have a bad archive * if the format wants the header to start at a BLKMULT boundary. While * we can deal with the mis-aligned data, it violates spec and other - * archive readers will likely fail. if the format is not block + * archive readers will likely fail. If the format is not block * aligned, the user may be lucky (and the archive is ok). */ if (res >= 0) { @@ -794,7 +794,7 @@ ar_rdsync(void) /* * ar_fow() - * Move the I/O position within the archive foward the specified number of + * Move the I/O position within the archive forward the specified number of * bytes as supported by the device. If we cannot move the requested * number of bytes, return the actual number of bytes moved in skipped. * Return: @@ -813,7 +813,7 @@ ar_fow(off_t sksz, off_t *skipped) return(0); /* - * we cannot move foward at EOF or error + * we cannot move forward at EOF or error */ if (lstrval <= 0) return(lstrval); @@ -822,7 +822,7 @@ ar_fow(off_t sksz, off_t *skipped) * Safer to read forward on devices where it is hard to find the end of * the media without reading to it. With tapes we cannot be sure of the * number of physical blocks to skip (we do not know physical block - * size at this point), so we must only read foward on tapes! + * size at this point), so we must only read forward on tapes! */ if (artyp != ISREG) return(0); @@ -907,7 +907,7 @@ ar_rev(off_t sksz) /* * we may try to go backwards past the start when the archive - * is only a single record. If this hapens and we are on a + * is only a single record. If this happens and we are on a * multi volume archive, we need to go to the end of the * previous volume and continue our movement backwards from * there. @@ -1046,7 +1046,7 @@ get_phys(void) } /* - * read foward to the file mark, then back up in front of the filemark + * read forward to the file mark, then back up in front of the filemark * (this is a bit paranoid, but should be safe to do). */ while ((res = read(arfd, scbuf, sizeof(scbuf))) > 0) Modified: head/bin/pax/ar_subs.c ============================================================================== --- head/bin/pax/ar_subs.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/ar_subs.c Sun May 22 14:03:38 2011 (r222177) @@ -854,7 +854,7 @@ copy(void) } /* - * Non standard -Y and -Z flag. When the exisiting file is + * Non standard -Y and -Z flag. When the existing file is * same age or newer skip */ if ((Yflag || Zflag) && ((lstat(arcn->name, &sb) == 0))) { @@ -1096,7 +1096,7 @@ next_head(ARCHD *arcn) } /* - * ok got a valid header, check for trailer if format encodes it in the + * ok got a valid header, check for trailer if format encodes it in * the header. */ if (frmt->inhead && ((*frmt->trail_cpio)(arcn) == 0)) { Modified: head/bin/pax/buf_subs.c ============================================================================== --- head/bin/pax/buf_subs.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/buf_subs.c Sun May 22 14:03:38 2011 (r222177) @@ -145,7 +145,7 @@ rd_start(void) } if (wrblksz % BLKMULT) { paxwarn(1, "Write block size %d is not a %d byte multiple", - wrblksz, BLKMULT); + wrblksz, BLKMULT); return(-1); } } @@ -182,13 +182,13 @@ cp_start(void) * the start of the header of the first file added to the archive. The * format specific end read function tells us how many bytes to move * backwards in the archive to be positioned BEFORE the trailer. Two - * different postions have to be adjusted, the O.S. file offset (e.g. the + * different positions have to be adjusted, the O.S. file offset (e.g. the * position of the tape head) and the write point within the data we have * stored in the read (soon to become write) buffer. We may have to move * back several records (the number depends on the size of the archive * record and the size of the format trailer) to read up the record where * the first byte of the trailer is recorded. Trailers may span (and - * overlap) record boundries. + * overlap) record boundaries. * We first calculate which record has the first byte of the trailer. We * move the OS file offset back to the start of this record and read it * up. We set the buffer write pointer to be at this byte (the byte where @@ -196,10 +196,10 @@ cp_start(void) * start of this record so a flush of this buffer will replace the record * in the archive. * A major problem is rewriting this last record. For archives stored - * on disk files, this is trival. However, many devices are really picky + * on disk files, this is trivial. However, many devices are really picky * about the conditions under which they will allow a write to occur. * Often devices restrict the conditions where writes can be made writes, - * so it may not be feasable to append archives stored on all types of + * so it may not be feasible to append archives stored on all types of * devices. * Return: * 0 for success, -1 for failure @@ -365,7 +365,7 @@ rd_sync(void) * pback() * push the data used during the archive id phase back into the I/O * buffer. This is required as we cannot be sure that the header does NOT - * overlap a block boundry (as in the case we are trying to recover a + * overlap a block boundary (as in the case we are trying to recover a * flawed archived). This was not designed to be used for any other * purpose. (What software engineering, HA!) * WARNING: do not even THINK of pback greater than BLKMULT, unless the @@ -382,7 +382,7 @@ pback(char *pt, int cnt) /* * rd_skip() - * skip foward in the archive during an archive read. Used to get quickly + * skip forward in the archive during an archive read. Used to get quickly * past file data and padding for files the user did NOT select. * Return: * 0 if ok, -1 failure, and 1 when EOF on the archive volume was detected. @@ -396,7 +396,7 @@ rd_skip(off_t skcnt) off_t skipped = 0; /* - * consume what data we have in the buffer. If we have to move foward + * consume what data we have in the buffer. If we have to move forward * whole records, we call the low level skip function to see if we can * move within the archive without doing the expensive reads on data we * do not want. @@ -453,7 +453,7 @@ rd_skip(off_t skcnt) * wr_fin() * flush out any data (and pad if required) the last block. We always pad * with zero (even though we do not have to). Padding with 0 makes it a - * lot easier to recover if the archive is damaged. zero paddding SHOULD + * lot easier to recover if the archive is damaged. zero padding SHOULD * BE a requirement.... */ @@ -530,7 +530,7 @@ rd_wrbuf(char *in, int cpcnt) /* * read error, return what we got (or the error if * no data was copied). The caller must know that an - * error occured and has the best knowledge what to + * error occurred and has the best knowledge what to * do with it */ if ((res = cpcnt - incnt) > 0) @@ -584,7 +584,7 @@ wr_skip(off_t skcnt) /* * wr_rdfile() - * fill write buffer with the contents of a file. We are passed an open + * fill write buffer with the contents of a file. We are passed an open * file descriptor to the file and the archive structure that describes the * file we are storing. The variable "left" is modified to contain the * number of bytes of the file we were NOT able to write to the archive. @@ -671,7 +671,7 @@ rd_wrfile(ARCHD *arcn, int ofd, off_t *l int isem = 1; int rem; int sz = MINFBSZ; - struct stat sb; + struct stat sb; u_long crc = 0L; /* @@ -884,7 +884,7 @@ buf_flush(int bufcnt) /* * if we have reached the user specified byte count for each archive - * volume, prompt for the next volume. (The non-standrad -R flag). + * volume, prompt for the next volume. (The non-standard -R flag). * NOTE: If the wrlimit is smaller than wrcnt, we will always write * at least one record. We always round limit UP to next blocksize. */ @@ -944,7 +944,7 @@ buf_flush(int bufcnt) } else if (cnt > 0) { /* * Oh drat we got a partial write! - * if format doesnt care about alignment let it go, + * if format doesn't care about alignment let it go, * we warned the user in ar_write().... but this means * the last record on this volume violates pax spec.... */ Modified: head/bin/pax/cpio.c ============================================================================== --- head/bin/pax/cpio.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/cpio.c Sun May 22 14:03:38 2011 (r222177) @@ -627,7 +627,7 @@ vcpio_rd(ARCHD *arcn, char *buf) return(-1); /* - * skip padding. header + filename is aligned to 4 byte boundries + * skip padding. header + filename is aligned to 4 byte boundaries */ if (rd_skip((off_t)(VCPIO_PAD(sizeof(HD_VCPIO) + nsz))) < 0) return(-1); @@ -942,7 +942,7 @@ bcpio_rd(ARCHD *arcn, char *buf) return(-1); /* - * header + file name are aligned to 2 byte boundries, skip if needed + * header + file name are aligned to 2 byte boundaries, skip if needed */ if (rd_skip((off_t)(BCPIO_PAD(sizeof(HD_BCPIO) + nsz))) < 0) return(-1); @@ -989,8 +989,8 @@ bcpio_endrd(void) * bcpio_wr() * copy the data in the ARCHD to buffer in old binary cpio format * There is a real chance of field overflow with this critter. So we - * always check the conversion is ok. nobody in his their right mind - * should write an achive in this format... + * always check that the conversion is ok. nobody in their right mind + * should write an archive in this format... * Return * 0 if file has data to be written after the header, 1 if file has NO * data to write after the header, -1 if archive write failed Modified: head/bin/pax/file_subs.c ============================================================================== --- head/bin/pax/file_subs.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/file_subs.c Sun May 22 14:03:38 2011 (r222177) @@ -84,9 +84,9 @@ file_creat(ARCHD *arcn) * works. We have to take special handling when the file does exist. To * detect this, we use O_EXCL. For example when trying to create a * file and a character device or fifo exists with the same name, we - * can accidently open the device by mistake (or block waiting to open) - * If we find that the open has failed, then figure spend the effort to - * figure out why. This strategy was found to have better average + * can accidentally open the device by mistake (or block waiting to + * open). If we find that the open has failed, then spend the effort + * to figure out why. This strategy was found to have better average * performance in common use than checking the file (and the path) * first with lstat. */ @@ -559,7 +559,7 @@ chk_path( char *name, uid_t st_uid, gid_ for(;;) { /* - * work foward from the first / and check each part of the path + * work forward from the first / and check each part of the path */ spt = strchr(spt, '/'); if (spt == NULL) @@ -600,7 +600,7 @@ chk_path( char *name, uid_t st_uid, gid_ (void)set_ids(name, st_uid, st_gid); /* - * make sure the user doen't have some strange umask that + * make sure the user doesn't have some strange umask that * causes this newly created directory to be unusable. We fix * the modes and restore them back to the creation default at * the end of pax @@ -716,11 +716,11 @@ set_pmode(char *fnm, mode_t mode) * uses lseek whenever it detects the input data is all 0 within that * file block. In more detail, the strategy is as follows: * While the input is all zero keep doing an lseek. Keep track of when we - * pass over file block boundries. Only write when we hit a non zero + * pass over file block boundaries. Only write when we hit a non zero * input. once we have written a file block, we continue to write it to * the end (we stop looking at the input). When we reach the start of the * next file block, start checking for zero blocks again. Working on file - * block boundries significantly reduces the overhead when copying files + * block boundaries significantly reduces the overhead when copying files * that are NOT very sparse. This overhead (when compared to a write) is * almost below the measurement resolution on many systems. Without it, * files with holes cannot be safely copied. It does has a side effect as @@ -923,7 +923,7 @@ set_crc(ARCHD *arcn, int fd) /* * safety check. we want to avoid archiving files that are active as - * they can create inconsistant archive copies. + * they can create inconsistent archive copies. */ if (cpcnt != arcn->sb.st_size) paxwarn(1, "File changed size %s", arcn->org_name); Modified: head/bin/pax/ftree.c ============================================================================== --- head/bin/pax/ftree.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/ftree.c Sun May 22 14:03:38 2011 (r222177) @@ -101,8 +101,8 @@ ftree_start(void) /* * optional user flags that effect file traversal * -H command line symlink follow only (half follow) - * -L follow sylinks (logical) - * -P do not follow sylinks (physical). This is the default. + * -L follow symlinks (logical) + * -P do not follow symlinks (physical). This is the default. * -X do not cross over mount points * -t preserve access times on files read. * -n select only the first member of a file tree when a match is found Modified: head/bin/pax/options.c ============================================================================== --- head/bin/pax/options.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/options.c Sun May 22 14:03:38 2011 (r222177) @@ -887,7 +887,7 @@ tar_options(int argc, char **argv) sawpat = 1; } /* - * if patterns were added, we are doing chdir() + * if patterns were added, we are doing chdir() * on a file-by-file basis, else, just one * global chdir (if any) after opening input. */ Modified: head/bin/pax/pat_rep.c ============================================================================== --- head/bin/pax/pat_rep.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/pat_rep.c Sun May 22 14:03:38 2011 (r222177) @@ -397,7 +397,7 @@ pat_sel(ARCHD *arcn) /* * should never happen.... */ - paxwarn(1, "Pattern list inconsistant"); + paxwarn(1, "Pattern list inconsistent"); return(-1); } *ppt = pt->fow; Modified: head/bin/pax/pax.c ============================================================================== --- head/bin/pax/pax.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/pax.c Sun May 22 14:03:38 2011 (r222177) @@ -372,7 +372,7 @@ gen_init(void) /* * signal handling to reset stored directory times and modes. Since * we deal with broken pipes via failed writes we ignore it. We also - * deal with any file size limit thorugh failed writes. Cpu time + * deal with any file size limit thorough failed writes. Cpu time * limits are caught and a cleanup is forced. */ if ((sigemptyset(&s_mask) < 0) || (sigaddset(&s_mask, SIGTERM) < 0) || Modified: head/bin/pax/sel_subs.c ============================================================================== --- head/bin/pax/sel_subs.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/sel_subs.c Sun May 22 14:03:38 2011 (r222177) @@ -376,7 +376,7 @@ trng_add(char *str) } /* - * by default we only will check file mtime, but usee can specify + * by default we only will check file mtime, but the user can specify * mtime, ctime (inode change time) or both. */ if ((flgpt == NULL) || (*flgpt == '\0')) Modified: head/bin/pax/tables.c ============================================================================== --- head/bin/pax/tables.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/tables.c Sun May 22 14:03:38 2011 (r222177) @@ -209,7 +209,7 @@ chk_lnk(ARCHD *arcn) * purg_lnk * remove reference for a file that we may have added to the data base as * a potential source for hard links. We ended up not using the file, so - * we do not want to accidently point another file at it later on. + * we do not want to accidentally point another file at it later on. */ void @@ -306,14 +306,14 @@ lnk_end(void) * An append with an -u must read the archive and store the modification time * for every file on that archive before starting the write phase. It is clear * that this is one HUGE database. To save memory space, the actual file names - * are stored in a scatch file and indexed by an in memory hash table. The + * are stored in a scratch file and indexed by an in memory hash table. The * hash table is indexed by hashing the file path. The nodes in the table store * the length of the filename and the lseek offset within the scratch file * where the actual name is stored. Since there are never any deletions to this * table, fragmentation of the scratch file is never an issue. Lookups seem to * not exhibit any locality at all (files in the database are rarely * looked up more than once...). So caching is just a waste of memory. The - * only limitation is the amount of scatch file space available to store the + * only limitation is the amount of scratch file space available to store the * path names. */ Modified: head/bin/pax/tar.c ============================================================================== --- head/bin/pax/tar.c Sun May 22 14:03:30 2011 (r222176) +++ head/bin/pax/tar.c Sun May 22 14:03:38 2011 (r222177) @@ -291,7 +291,7 @@ tar_chksm(char *blk, int len) /* * tar_id() * determine if a block given to us is a valid tar header (and not a USTAR - * header). We have to be on the lookout for those pesky blocks of all + * header). We have to be on the lookout for those pesky blocks of all * zero's. * Return: * 0 if a tar header, -1 otherwise From owner-svn-src-all@FreeBSD.ORG Sun May 22 14:03:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30CF310656D1; Sun, 22 May 2011 14:03:47 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 210D68FC13; Sun, 22 May 2011 14:03:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4ME3lJZ077243; Sun, 22 May 2011 14:03:47 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4ME3kqg077239; Sun, 22 May 2011 14:03:46 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201105221403.p4ME3kqg077239@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 22 May 2011 14:03:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222178 - in head/bin: ed ps sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 14:03:47 -0000 Author: uqs Date: Sun May 22 14:03:46 2011 New Revision: 222178 URL: http://svn.freebsd.org/changeset/base/222178 Log: Fix some typos under bin/ Found by: codespell Modified: head/bin/ed/POSIX head/bin/ps/ps.c head/bin/sh/mkinit.c Modified: head/bin/ed/POSIX ============================================================================== --- head/bin/ed/POSIX Sun May 22 14:03:38 2011 (r222177) +++ head/bin/ed/POSIX Sun May 22 14:03:46 2011 (r222178) @@ -75,7 +75,7 @@ DEVIATIONS 2) Since the behavior of `u' (undo) within a `g' (global) command list is not specified by POSIX, it follows the behavior of the SunOS ed: undo forces a global command list to be executed only once, rather than - for each line matching a global pattern. In addtion, each instance of + for each line matching a global pattern. In addition, each instance of `u' within a global command undoes all previous commands (including undo's) in the command list. This seems the best way, since the alternatives are either too complicated to implement or too confusing @@ -83,7 +83,7 @@ DEVIATIONS The global/undo combination is useful for masking errors that would otherwise cause a script to fail. For instance, an ed script - to remove any occurences of either `censor1' or `censor2' might be + to remove any occurrences of either `censor1' or `censor2' might be written as: ed - file < Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8AC4106566B; Sun, 22 May 2011 14:23:48 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B77878FC1B; Sun, 22 May 2011 14:23:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MENmXI077918; Sun, 22 May 2011 14:23:48 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MENm0b077909; Sun, 22 May 2011 14:23:48 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201105221423.p4MENm0b077909@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 22 May 2011 14:23:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222179 - in head/share/examples: diskless drivers netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 14:23:48 -0000 Author: uqs Date: Sun May 22 14:23:48 2011 New Revision: 222179 URL: http://svn.freebsd.org/changeset/base/222179 Log: Fix more typos to be a good example. Found by: codespell Modified: head/share/examples/diskless/README.TEMPLATING head/share/examples/drivers/make_device_driver.sh head/share/examples/netgraph/ether.bridge head/share/examples/netgraph/frame_relay head/share/examples/netgraph/ngctl head/share/examples/netgraph/raw head/share/examples/netgraph/virtual.chain head/share/examples/netgraph/virtual.lan Modified: head/share/examples/diskless/README.TEMPLATING ============================================================================== --- head/share/examples/diskless/README.TEMPLATING Sun May 22 14:03:46 2011 (r222178) +++ head/share/examples/diskless/README.TEMPLATING Sun May 22 14:23:48 2011 (r222179) @@ -136,7 +136,7 @@ be useful to set up clients and server f should never be overwritten by the templating copy. - TYPICAL CUSTOMIZED CONFIGRATION SOFTLINKS + TYPICAL CUSTOMIZED CONFIGURATION SOFTLINKS The following files typically need to be turned into softlinks to /conf/ME/: @@ -261,9 +261,9 @@ be useful to set up clients and server f identity.pub WHEN INITIALLY CONVERTING A TARGET MACHINE TO USE TEMPLATING, ALWAYS - MAKE A FULL BACKUP OF THE TARGET MACHINE FIRST! You may accidently delete - files on the target during the conversion due to forgetting to enter - items into appropriate .cpignore files on the source. + MAKE A FULL BACKUP OF THE TARGET MACHINE FIRST! You may accidentally + delete files on the target during the conversion due to forgetting to + enter items into appropriate .cpignore files on the source. SECURITY CONSIDERATIONS WITH NFS ROOT EXPORT FROM TEMPLATE MACHINE SECURITY CONSIDERATIONS WITH NFS USR EXPORT FROM TEMPLATE MACHINE Modified: head/share/examples/drivers/make_device_driver.sh ============================================================================== --- head/share/examples/drivers/make_device_driver.sh Sun May 22 14:03:46 2011 (r222178) +++ head/share/examples/drivers/make_device_driver.sh Sun May 22 14:23:48 2011 (r222179) @@ -485,7 +485,7 @@ ${1}_isa_probe (device_t device) /*rid*/0, membase, memsize); /* * We found one, return non-positive numbers.. - * Return -N if we cant handle it, but not well. + * Return -N if we can't handle it, but not well. * Return -2 if we would LIKE the device. * Return -1 if we want it a lot. * Return 0 if we MUST get the device. Modified: head/share/examples/netgraph/ether.bridge ============================================================================== --- head/share/examples/netgraph/ether.bridge Sun May 22 14:03:46 2011 (r222178) +++ head/share/examples/netgraph/ether.bridge Sun May 22 14:23:48 2011 (r222179) @@ -40,7 +40,7 @@ BRIDGE_NAME="bnet0" # machine as well then set ${LOCAL_IFACES} as well (they may also be # listed in ${BRIDGE_IFACES}). Of course, any ${LOCAL_IFACE} must # be ifconfig(8)ured separately. If you don't want a ${LOCAL_IFACE} -# then assign it the emtpy string. +# then assign it the empty string. BRIDGE_IFACES="de0 fxp0 fxp1" LOCAL_IFACES="fxp0 fxp1" Modified: head/share/examples/netgraph/frame_relay ============================================================================== --- head/share/examples/netgraph/frame_relay Sun May 22 14:03:46 2011 (r222178) +++ head/share/examples/netgraph/frame_relay Sun May 22 14:23:48 2011 (r222179) @@ -13,13 +13,13 @@ ngctl mkpeer ${CARD}: frame_relay rawdat # Link management protocol node. ngctl mkpeer ${CARD}:rawdata lmi dlci0 auto0 -# Also attach dlci 1023, as it needs both to try autoconfiguring. +# Also attach dlci 1023, as it needs both to try auto-configuring. # The Link management protocol is now alive and probing.. ngctl connect ${CARD}:rawdata ${CARD}:rawdata.dlci0 dlci1023 auto1023 # Attach the DLCI(channel) the Telco has assigned you to -# a node to hadle whatever protocol encapsulation your peer -# is using. In this case rfc1490 encapsulation. +# a node to handle whatever protocol encapsulation your peer +# is using. In this case RFC1490 encapsulation. ngctl mkpeer ${CARD}:rawdata rfc1490 dlci${DLCI} downstream @@ -34,8 +34,8 @@ ngctl mkpeer ${CARD}:rawdata.dlci${DLCI} # Then use ifconfig on interface ng0 as usual # A variant on this whole set might use the 'name' command to make it more -# readable. but it doesn't work if you have multiple lines or dlcis -# e.g. +# readable. But it doesn't work if you have multiple lines or dlcis +# e.g. # ngctl mkpeer ${CARD}: frame_relay rawdata downstream # ngctl name ${CARD}:rawdata mux # ngctl mkpeer mux: lmi dlci0 auto0 Modified: head/share/examples/netgraph/ngctl ============================================================================== --- head/share/examples/netgraph/ngctl Sun May 22 14:03:46 2011 (r222178) +++ head/share/examples/netgraph/ngctl Sun May 22 14:23:48 2011 (r222179) @@ -46,7 +46,7 @@ # Note that we used ngctl's ``name'' command to do this. However, # the following manually constructed netgraph message would have -# acomplished the exact same thing: +# accomplished the exact same thing: + msg foo name { name="fred" } @@ -85,7 +85,7 @@ # As soon as we sent the message, we got back a response. Here # ngctl is telling us that it received a control message with the -# NGF_RESP (response) flag set, the reponse was to a prior ``getname'' +# NGF_RESP (response) flag set, the response was to a prior ``getname'' # control message, that the originator was the node addressable # as ``fred:''. The message arguments field is then displayed to # us in its ASCII form. In this case, what we get back is a struct Modified: head/share/examples/netgraph/raw ============================================================================== --- head/share/examples/netgraph/raw Sun May 22 14:03:46 2011 (r222178) +++ head/share/examples/netgraph/raw Sun May 22 14:23:48 2011 (r222179) @@ -6,7 +6,7 @@ CARD=sr0 # create an interface "ng0" and attach it to the sync port. -# The packets had jolly well better be ip because we are not discriminating. +# The packets had jolly well better be IP because we are not discriminating. ngctl mkpeer ${CARD}: iface rawdata inet # if ng0 already exists, use a CONNECT command instead of a mkpeer. e.g. Modified: head/share/examples/netgraph/virtual.chain ============================================================================== --- head/share/examples/netgraph/virtual.chain Sun May 22 14:03:46 2011 (r222178) +++ head/share/examples/netgraph/virtual.chain Sun May 22 14:23:48 2011 (r222179) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010, Yavuz Gokirmak +# Copyright (c) 2010, Yavuz Gokirmak # # All rights reserved. # @@ -14,7 +14,6 @@ # # $FreeBSD$ # -# # This script creates and connects n router like nodes. Complex wide # area topologies can be created with the help of script. # @@ -25,9 +24,9 @@ # # 0. Make your own copy of this example script. # -# 1. Edit the definition of ${TARGET_TOPOLOGY} to define your virtual +# 1. Edit the definition of ${TARGET_TOPOLOGY} to define your virtual # nodes. Virtual topology definition includes node names and their -# IP address. Target top. sytax: ( name|ip<->name|ip ... ) +# IP address. Target top. syntax: ( name|ip<->name|ip ... ) # Example 1: ( n1|10.0.2.1/30<->n2|10.0.2.2/30 ...) # Example 2: ( n1|2001:b90::14a/125<->n1|2001:b90::14b/125 ...) # @@ -35,21 +34,21 @@ # # 3. Add necessary static route commands for each virtual node. For # example assume you have three virtual nodes connected each other -# llike a chain ( n1 is connected to n2, n2 is connecte to n3 ). -# In order to estabklish connectivity among these virtual nodes, +# like a chain (n1 is connected to n2, n2 is connected to n3). +# In order to establish connectivity among these virtual nodes, # you have to add default routes to node n1 and node n3. Example # static route command is: -# STATIC_ROUTE0="jexec n1 route add -inet default 10.0.2.2" -# STATIC_ROUTE1="jexec n3 route add -inet default 10.0.2.5" -# After defining default routes with above format you have to set +# STATIC_ROUTE0="jexec n1 route add -inet default 10.0.2.2" +# STATIC_ROUTE1="jexec n3 route add -inet default 10.0.2.5" +# After defining default routes with above format you have to set # the total number of static route commands as: # STATIC_ROUTE_CNT=2 # # 4. Stop bridging by running this script with "stop" as the # command line argument. -# -# 5. This cript uses a template file in order to carry information -# between start and stop calls. +# +# 5. This script uses a template file in order to carry information +# between start and stop calls. # In the start call, the netgraph interfaces and jails are created. # At the stop phase, all created objects should be removed. # DO NOT delete the temporary file between the start and stop phases. @@ -84,8 +83,8 @@ # # -# List the names of virtual nodes and their IP addresses. Use ':' -# character to seperate node name from node IP address and netmask. +# List the names of virtual nodes and their IP addresses. Use ':' +# character to separate node name from node IP address and netmask. TARGET_TOPOLOGY="n1|10.0.2.1/30<->n2|10.0.2.2/30 n2|10.0.2.5/30<->n3|10.0.2.6/30 n2|10.0.2.9/30<->n4|10.0.2.10/30" STATIC_ROUTE0="jexec n1 route add -inet default 10.0.2.2" @@ -93,10 +92,10 @@ STATIC_ROUTE1="jexec n3 route add -inet STATIC_ROUTE2="jexec n4 route add -inet default 10.0.2.9" STATIC_ROUTE_CNT=3 -# MAC manifacturer prefix. This can be modified according to needs. -MAC_PREFIX="00:1d:92" +# MAC manufacturer prefix. This can be modified according to needs. +MAC_PREFIX="00:1d:92" -# Temporary file is important for proper execution of script. +# Temporary file is important for proper execution of script. TEMP_FILE="/var/tmp/.virtual.chain.tmp" # Set root directory for jails to be created. @@ -112,7 +111,7 @@ JAIL_PATH="/usr/jails/router" virtual_chain_start() { # Load netgraph KLD's as necessary. - + for KLD in ng_ether ng_bridge ng_eiface; do if ! kldstat -v | grep -qw ${KLD}; then echo -n "Loading ${KLD}.ko... " @@ -122,21 +121,21 @@ virtual_chain_start() { done # Reset all interfaces and jails. If temporary file can not be found - # script assumes that there is no previous configuration. - + # script assumes that there is no previous configuration. + if [ ! -e ${TEMP_FILE} ]; then echo "No previous configuration(${TEMP_FILE}) found to clean-up." else echo -n "Cleaning previous configuration..." virtual_chain_stop echo "done" - fi + fi - # Create temporary file for usage. This file includes generated + # Create temporary file for usage. This file includes generated # interface names and jail names. All bridges, interfaces and jails - # are written to file while created. In clean-up process written - # objects are cleaned (i.e removed) from system. - + # are written to file while created. In clean-up process written + # objects are cleaned (i.e. removed) from system. + if [ -e ${TEMP_FILE} ]; then touch ${TEMP_FILE} fi @@ -144,40 +143,40 @@ virtual_chain_start() { # Attach other interfaces as well. for CONNECTION in ${TARGET_TOPOLOGY}; do - + # Virtual connections are defined in TARGET_TOPOLOGY variable. # They have the form of 'nodeName|IPaddr'. Below two lines split - + PEER1=`echo ${CONNECTION} | awk -F"<->" '{print $1}'` PEER1_NAME=`echo ${PEER1} | awk -F"|" '{print $1}'` PEER1_IP=`echo ${PEER1} | awk -F"|" '{print $2}'` - + PEER2=`echo ${CONNECTION} | awk -F"<->" '{print $2}'` PEER2_NAME=`echo ${PEER2} | awk -F"|" '{print $1}'` PEER2_IP=`echo ${PEER2} | awk -F"|" '{print $2}'` # !!! if not created already.. - # Create virtual node (jail) with given name and using + # Create virtual node (jail) with given name and using # JAIL_PATH as root directory for jail. virtual_chain_create_peer_if_necessary ${PEER1_NAME} virtual_chain_create_peer_if_necessary ${PEER2_NAME} # create an interface for peer with the given peer IP. Get interface - # for future use; you will connect this interface to the other + # for future use; you will connect this interface to the other # peers' (PEER2) interface. virtual_chain_create_interface_with_ip ${PEER1_NAME} ${PEER1_IP} PEER1_INTERFACE=${RET_INTERFACE} - + # create an interface for peer with the given peer IP. Get interface - # for future use; you will connect this interface to the other + # for future use; you will connect this interface to the other # peers' (PEER2) interface. virtual_chain_create_interface_with_ip ${PEER2_NAME} ${PEER2_IP} PEER2_INTERFACE=${RET_INTERFACE} # Connect virtual interface to other interface. Syntax is : # ngctl connect INTERFACE1: INTERFACE2: ether ether. - + echo -n "Connecting ${PEER1_INTERFACE}:ether to ${PEER2_INTERFACE}:ether..." ngctl connect ${PEER1_INTERFACE}: ${PEER2_INTERFACE}: ether ether \ || exit 1 @@ -193,7 +192,7 @@ virtual_chain_start() { i=`expr $i + 1` done - echo "Virtual WAN established succesfully!" + echo "Virtual WAN established successfully!" } virtual_chain_create_interface_with_ip() { @@ -201,35 +200,35 @@ virtual_chain_create_interface_with_ip() NODE_NAME=$1 NODE_IP=$2 - # Create a ng_eiface object for virtual node. ng_eiface + # Create a ng_eiface object for virtual node. ng_eiface # object has a hook that can be connected to one of bridge - # links. After creating interface get its automatically - # generated name for further usage. + # links. After creating interface get its automatically + # generated name for further usage. echo "Creating eiface interface for virtual node ${NODE_NAME}." ngctl mkpeer eiface ether ether EIFACE=`ngctl l | grep ngeth | tail -n 1| awk '{print $2}'` - echo "Interface ${EIFACE} is created." - + echo "Interface ${EIFACE} is created." + # Write name of the interface to temp file. Clean-up procedure # will use this name to shutdown interface. - + echo "interface ${EIFACE}" >> ${TEMP_FILE} - # Move virtual interface to virtual node. Note that Interface + # Move virtual interface to virtual node. Note that Interface # name will not be changed at the end of this movement. Moved # interface can be seen at the output of ifconfig command in # jail: 'jexec jailname ifconfig' - echo "Moving ${EIFACE} to ${NODE_NAME}" + echo "Moving ${EIFACE} to ${NODE_NAME}" ifconfig ${EIFACE} vnet ${NODE_NAME} - + # Make lo0 interface localhost. jexec ${NODE_NAME} ifconfig lo0 localhost # Generate a random mac address for virtual interface. First # three octets can be changed by user. Last three octets are - # generated randomly. + # generated randomly. M4=`od -An -N2 -i /dev/random | sed -e 's/ //g' | \ awk '{ print $1 % 256 }'` M5=`od -An -N2 -i /dev/random | sed -e 's/ //g' | \ @@ -244,16 +243,16 @@ virtual_chain_create_interface_with_ip() echo "Setting MAC address of ${EIFACE} to '${MAC}'" jexec ${NODE_NAME} ifconfig ${EIFACE} link $MAC - # Either IPv4 or IPv6 can be used in this script. Ifconfig + # Either IPv4 or IPv6 can be used in this script. Ifconfig # IP setting syntax differs slightly for two IP versions. # For version 4 'inet' keyword is used whereas for version 6 # 'inet6' is used. Below line tries to decide which IP version - # is given and sets IPVER to 'inet' or 'inet6'. + # is given and sets IPVER to 'inet' or 'inet6'. IPVER=`echo ${NODE_IP} | awk -F"." '{ split($4,last,"/"); \ if( NF==4 && $1>0 && $1<256 && $2<256 && $3<256 && \ last[1]<256) print "inet"; else print "inet6"}'` - + # Set IP address of virtual interface in virtual node. echo "Setting IP address of ${EIFACE} to '${NODE_IP}'" jexec ${NODE_NAME} ifconfig ${EIFACE} ${IPVER} ${NODE_IP} @@ -264,23 +263,22 @@ virtual_chain_create_interface_with_ip() virtual_chain_create_peer_if_necessary() { if ! grep -q $1 ${TEMP_FILE} ; then - - echo -n "Creating virtual node (jail) ${1}..." + + echo -n "Creating virtual node (jail) ${1}..." jail -c vnet name=${1} host.hostname=${1} \ - path=${JAIL_PATH} persist + path=${JAIL_PATH} persist jexec ${1} sysctl -w net.inet.ip.forwarding=1 jexec ${1} sysctl -w net.inet6.ip6.forwarding=1 echo "done" - - # Write name of the jail to temp file. Clean-up + + # Write name of the jail to temp file. Clean-up # procedure will use this name to remove jail. - + echo "node ${1}" >> ${TEMP_FILE} fi } - # Stop routine. virtual_chain_stop() { @@ -288,31 +286,31 @@ virtual_chain_stop() { echo "Nothing to stop! ${TEMP_FILE}: temp file not found" else - echo -n "Shutdown bridge interface.." + echo -n "Shutdown bridge interface.." OBJECTS=`cat ${TEMP_FILE} | grep bridge | awk '{print $2}'` for BRIDGE in ${OBJECTS}; do ngctl shutdown ${BRIDGE}: >/dev/null 2>&1 done echo "done" - - echo -n "Shutdown all eiface interfaces..." + + echo -n "Shutdown all eiface interfaces..." OBJECTS=`cat ${TEMP_FILE} | grep interface | awk '{print $2}'` for INTERFACE in ${OBJECTS}; do ngctl shutdown ${INTERFACE}: >/dev/null 2>&1 done echo "done" - - echo -n "Removing all jails..." + + echo -n "Removing all jails..." OBJECTS=`cat ${TEMP_FILE} | grep node | awk '{print $2}'` for NODE in ${OBJECTS}; do jail -r ${NODE} done echo "done" - - echo "Removing tempfile ${TEMP_FILE}" + + echo "Removing tempfile ${TEMP_FILE}" rm ${TEMP_FILE} fi - echo "Virtual LAN objects removed succesfully!" + echo "Virtual LAN objects removed successfully!" } @@ -324,7 +322,6 @@ virtual_chain_usage() { # Main entry point. - case $# in 1) case $1 in @@ -340,7 +337,7 @@ case $# in echo " temp file not found" else virtual_chain_stop - fi + fi ;; help) virtual_chain_usage Modified: head/share/examples/netgraph/virtual.lan ============================================================================== --- head/share/examples/netgraph/virtual.lan Sun May 22 14:03:46 2011 (r222178) +++ head/share/examples/netgraph/virtual.lan Sun May 22 14:23:48 2011 (r222179) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010, Yavuz Gokirmak +# Copyright (c) 2010, Yavuz Gokirmak # # All rights reserved. # @@ -13,13 +13,12 @@ # its use. # # $FreeBSD$ - # -# This script adds virtual nodes to one of the physical interfaces +# This script adds virtual nodes to one of the physical interfaces # visible on your local area network (LAN). Virtual nodes seems real -# to external observers. +# to external observers. # If traceroute is executed to one of virtual nodes, the IP -# address of the physical interface will not be seen in the output. +# address of the physical interface will not be seen in the output. # Virtual nodes are generated via jails and network connections are # established using ng_bridge(4) and ng_eiface(4) node types. # @@ -29,11 +28,11 @@ # # 1. Edit the definition of ${ETHER_INTF} as described below # to define your real interface connected to the LAN. Virtual nodes -# will placed on the same physical network as this interface. +# will placed on the same physical network as this interface. # -# 2. Edit the definition of ${TARGET_TOPOLOGY} to define your virtual +# 2. Edit the definition of ${TARGET_TOPOLOGY} to define your virtual # nodes. Virtual topology definition includes node names and their -# IP address. Target top. sytax: ( node1|ip1/24 node2|ip2/24 ... ) +# IP address. Target top. syntax: ( node1|ip1/24 node2|ip2/24 ... ) # Example 1: ( n1|122.122.122.12/24, n2|122.122.122.13/24 ...) # Example 2: ( n1|2001:b90::14a/125, n1|2001:b90::14b/125 ...) # @@ -41,9 +40,9 @@ # # 4. Stop bridging by running this script with "stop" as the # command line argument. -# -# 5. This cript uses a template file in order to carry information -# between start and stop calls. +# +# 5. This script uses a template file in order to carry information +# between start and stop calls. # In the start call, the netgraph interfaces and jails are created. # At the stop phase, all created objects should be removed. # DO NOT delete the temporary file between the start and stop phases. @@ -80,19 +79,19 @@ # # Give the name of ethernet interface. Virtual nodes will be seen as -# local neighbours of this interface. +# local neighbours of this interface. ETHER_INTF="em0" -# List the names of virtual nodes and their IP addresses. Use ':' -# character to seperate node name from node IP address and netmask. +# List the names of virtual nodes and their IP addresses. Use ':' +# character to separate node name from node IP address and netmask. TARGET_TOPOLOGY="c1|10.0.2.20/24 c2|10.0.2.21/24 c3|10.0.2.22/24" -# MAC manifacturer prefix. This can be modified according to needs. -MAC_PREFIX="00:1d:92" +# MAC manufacturer prefix. This can be modified according to needs. +MAC_PREFIX="00:1d:92" -# Temporary file is important for proper execution of script. +# Temporary file is important for proper execution of script. TEMP_FILE="/var/tmp/.virtual.lan.tmp" # Set root directory for jails to be created. @@ -108,7 +107,7 @@ JAIL_PATH="/usr/jails/node" virtual_lan_start() { # Load netgraph KLD's as necessary. - + for KLD in ng_ether ng_bridge ng_eiface; do if ! kldstat -v | grep -qw ${KLD}; then echo -n "Loading ${KLD}.ko... " @@ -118,21 +117,21 @@ virtual_lan_start() { done # Reset all interfaces and jails. If temporary file can not be found - # script assumes that there is no previous configuration. - + # script assumes that there is no previous configuration. + if [ ! -e ${TEMP_FILE} ]; then echo "No previous configuration(${TEMP_FILE}) found to clean-up." else echo -n "Cleaning previous configuration..." virtual_lan_stop echo "done" - fi + fi - # Create temporary file for usage. This file includes generated + # Create temporary file for usage. This file includes generated # interface names and jail names. All bridges, interfaces and jails - # are written to file while created. In clean-up process written - # objects are cleaned (i.e removed) from system. - + # are written to file while created. In clean-up process written + # objects are cleaned (i.e. removed) from system. + if [ -e ${TEMP_FILE} ]; then touch ${TEMP_FILE} fi @@ -150,20 +149,20 @@ virtual_lan_start() { # is used to create a name for new bridge. BRIDGE_COUNT=`ngctl l | grep bridge | wc -l | sed -e "s/ //g"` BRIDGE_NAME="bridge${BRIDGE_COUNT}" - + # Create new ng_bridge(4) node and attach it to the ethernet interface. # Connect ng_ether:lower hook to bridge:link0 when creating bridge and # connect ng_ether:upper hook to bridge:link1 after bridge name is set. - + echo "Creating bridge interface: ${BRIDGE_NAME}..." ngctl mkpeer ${ETHER_INTF}: bridge lower link0 || exit 1 ngctl name ${ETHER_INTF}:lower ${BRIDGE_NAME} || exit 1 ngctl connect ${ETHER_INTF}: ${BRIDGE_NAME}: upper link1 || exit 1 echo "Bridge ${BRIDGE_NAME} is created and ${ETHER_INTF} is connected." - + # In the above code block two hooks are connected to bridge interface, - # therefore LINKNUM is set to 2 indicating total number of connected - # hooks on the bridge interface. + # therefore LINKNUM is set to 2 indicating total number of connected + # hooks on the bridge interface. LINKNUM=2 # Write name of the bridge to temp file. Clean-up procedure will use @@ -173,7 +172,7 @@ virtual_lan_start() { # Attach other interfaces as well. for NODE in ${TARGET_TOPOLOGY}; do - + # Virtual nodes are defined in TARGET_TOPOLOGY variable. They # have the form of 'nodeName|IPaddr'. Below two lines split # node definition to get node name and node IP. @@ -181,48 +180,48 @@ virtual_lan_start() { NODE_NAME=`echo ${NODE} | awk -F"|" '{print $1}'` NODE_IP=`echo ${NODE} | awk -F"|" '{print $2}'` - # Create virtual node (jail) with given name and using + # Create virtual node (jail) with given name and using # JAIL_PATH as root directory for jail. - echo -n "Creating virtual node (jail) ${NODE_NAME}..." + echo -n "Creating virtual node (jail) ${NODE_NAME}..." jail -c vnet name=${NODE_NAME} host.hostname=${NODE_NAME} \ - path=${JAIL_PATH} persist + path=${JAIL_PATH} persist echo "done" - - # Write name of the jail to temp file. Clean-up procedure will + + # Write name of the jail to temp file. Clean-up procedure will # use this name to remove jail. - + echo "node ${NODE_NAME}" >> ${TEMP_FILE} - # Create a ng_eiface object for virtual node. ng_eiface + # Create a ng_eiface object for virtual node. ng_eiface # object has a hook that can be connected to one of bridge - # links. After creating interface get its automatically - # generated name for further usage. + # links. After creating interface get its automatically + # generated name for further usage. echo "Creating eiface interface for virtual node ${NODE_NAME}." ngctl mkpeer eiface ether ether EIFACE=`ngctl l | grep ngeth | tail -n 1| awk '{print $2}'` - echo "Interface ${EIFACE} is created." - + echo "Interface ${EIFACE} is created." + # Write name of the interface to temp file. Clean-up procedure # will use this name to shutdown interface. - + echo "interface ${EIFACE}" >> ${TEMP_FILE} - - # Move virtual interface to virtual node. Note that Interface + + # Move virtual interface to virtual node. Note that Interface # name will not be changed at the end of this movement. Moved # interface can be seen at the output of ifconfig command in # jail: 'jexec jailname ifconfig' - echo "Moving ${EIFACE} to ${NODE_NAME}" + echo "Moving ${EIFACE} to ${NODE_NAME}" ifconfig ${EIFACE} vnet ${NODE_NAME} - + # Make lo0 interface localhost. jexec ${NODE_NAME} ifconfig lo0 localhost # Generate a random mac address for virtual interface. First # three octets can be changed by user. Last three octets are - # generated randomly. + # generated randomly. M4=`od -An -N2 -i /dev/random | sed -e 's/ //g' | \ awk '{ print $1 % 256 }'` M5=`od -An -N2 -i /dev/random | sed -e 's/ //g' | \ @@ -237,35 +236,35 @@ virtual_lan_start() { echo "Setting MAC address of ${EIFACE} to '${MAC}'" jexec ${NODE_NAME} ifconfig ${EIFACE} link $MAC - # Either IPv4 or IPv6 can be used in this script. Ifconfig + # Either IPv4 or IPv6 can be used in this script. Ifconfig # IP setting syntax differs slightly for two IP versions. # For version 4 'inet' keyword is used whereas for version 6 # 'inet6' is used. Below line tries to decide which IP version - # is given and sets IPVER to 'inet' or 'inet6'. + # is given and sets IPVER to 'inet' or 'inet6'. IPVER=`echo ${NODE_IP} | awk -F"." '{ split($4,last,"/"); \ if( NF==4 && $1>0 && $1<256 && $2<256 && $3<256 && \ last[1]<256) print "inet"; else print "inet6"}'` - + # Set IP address of virtual interface in virtual node. echo "Setting IP address of ${EIFACE} to '${NODE_IP}'" jexec ${NODE_NAME} ifconfig ${EIFACE} ${IPVER} ${NODE_IP} - + # Connect virtual interface to bridge interface. Syntax is : # ngctl connect INTERFACE: BRIDGE: INTERFACE_HOOK EMPTY_LINK. # Interface has one hook named 'ether' and below line connects - # ether hook to bridge's first unconnected link. - + # ether hook to bridge's first unconnected link. + echo -n "Connecting ${EIFACE}:ether to ${BRIDGE_NAME}:link${LINKNUM}..." ngctl connect ${EIFACE}: ${BRIDGE_NAME}: ether link${LINKNUM} \ || exit 1 echo "done" # Now, bridge has one more connected link thus link count is - # incremented. + # incremented. LINKNUM=`expr ${LINKNUM} + 1` done - echo "Virtual LAN established succesfully!" + echo "Virtual LAN established successfully!" } @@ -276,31 +275,31 @@ virtual_lan_stop() { echo "Nothing to stop! ${TEMP_FILE}: temp file not found" else - echo -n "Shutdown bridge interface.." + echo -n "Shutdown bridge interface.." OBJECTS=`cat ${TEMP_FILE} | grep bridge | awk '{print $2}'` for BRIDGE in ${OBJECTS}; do ngctl shutdown ${BRIDGE}: >/dev/null 2>&1 done echo "done" - - echo -n "Shutdown all eiface interfaces..." + + echo -n "Shutdown all eiface interfaces..." OBJECTS=`cat ${TEMP_FILE} | grep interface | awk '{print $2}'` for INTERFACE in ${OBJECTS}; do ngctl shutdown ${INTERFACE}: >/dev/null 2>&1 done echo "done" - - echo -n "Removing all jails..." + + echo -n "Removing all jails..." OBJECTS=`cat ${TEMP_FILE} | grep node | awk '{print $2}'` for NODE in ${OBJECTS}; do jail -r ${NODE} done echo "done" - - echo "Removing tempfile ${TEMP_FILE}" + + echo "Removing tempfile ${TEMP_FILE}" rm ${TEMP_FILE} fi - echo "Virtual LAN objects removed succesfully!" + echo "Virtual LAN objects removed successfully!" } @@ -327,7 +326,7 @@ case $# in echo " temp file not found" else virtual_lan_stop - fi + fi ;; help) virtual_lan_usage From owner-svn-src-all@FreeBSD.ORG Sun May 22 15:01:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2311E106564A; Sun, 22 May 2011 15:01:03 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12ADD8FC0A; Sun, 22 May 2011 15:01:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MF12Nc079092; Sun, 22 May 2011 15:01:02 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MF12uH079088; Sun, 22 May 2011 15:01:02 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105221501.p4MF12uH079088@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 May 2011 15:01:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222180 - in stable/8/sys: dev/bm powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 15:01:03 -0000 Author: nwhitehorn Date: Sun May 22 15:01:02 2011 New Revision: 222180 URL: http://svn.freebsd.org/changeset/base/222180 Log: MFC r221519,221813: Do not use Open Firmware to open the device and instead program its start on our own. This prevents hangs at boot when using a bm(4) NIC where the cable is not plugged in at boot time. Obtained from: NetBSD Modified: stable/8/sys/dev/bm/if_bm.c stable/8/sys/powerpc/powermac/macio.c stable/8/sys/powerpc/powermac/maciovar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/bm/if_bm.c ============================================================================== --- stable/8/sys/dev/bm/if_bm.c Sun May 22 14:23:48 2011 (r222179) +++ stable/8/sys/dev/bm/if_bm.c Sun May 22 15:01:02 2011 (r222180) @@ -558,6 +558,7 @@ bm_attach(device_t dev) } /* alloc interrupt */ + bm_disable_interrupts(sc); sc->sc_txdmairqid = BM_TXDMA_INTERRUPT; sc->sc_txdmairq = bus_alloc_resource_any(dev, SYS_RES_IRQ, @@ -591,9 +592,6 @@ bm_attach(device_t dev) eaddr = sc->sc_enaddr; OF_getprop(node, "local-mac-address", eaddr, ETHER_ADDR_LEN); - /* reset the adapter */ - bm_chip_setup(sc); - /* * Setup MII * On Apple BMAC controllers, we end up in a weird state of @@ -608,6 +606,9 @@ bm_attach(device_t dev) return (error); } + /* reset the adapter */ + bm_chip_setup(sc); + sc->sc_mii = device_get_softc(sc->sc_miibus); if_initname(ifp, device_get_name(sc->sc_dev), @@ -1129,31 +1130,16 @@ bm_chip_setup(struct bm_softc *sc) { uint16_t reg; uint16_t *eaddr_sect; - char path[128]; - ihandle_t bmac_ih; eaddr_sect = (uint16_t *)(sc->sc_enaddr); - - /* - * Enable BMAC cell by opening and closing its OF node. This enables - * the cell in macio as a side effect. We should probably directly - * twiddle the FCR bits, but we lack a good interface for this at the - * present time. - */ - - OF_package_to_path(ofw_bus_get_node(sc->sc_dev), path, sizeof(path)); - bmac_ih = OF_open(path); - if (bmac_ih == -1) { - device_printf(sc->sc_dev, - "Enabling BMAC cell failed! Hoping it's already active.\n"); - } else { - OF_close(bmac_ih); - } + dbdma_stop(sc->sc_txdma); + dbdma_stop(sc->sc_rxdma); /* Reset chip */ CSR_WRITE_2(sc, BM_RX_RESET, 0x0000); CSR_WRITE_2(sc, BM_TX_RESET, 0x0001); do { + DELAY(10); reg = CSR_READ_2(sc, BM_TX_RESET); } while (reg & 0x0001); Modified: stable/8/sys/powerpc/powermac/macio.c ============================================================================== --- stable/8/sys/powerpc/powermac/macio.c Sun May 22 14:23:48 2011 (r222179) +++ stable/8/sys/powerpc/powermac/macio.c Sun May 22 15:01:02 2011 (r222180) @@ -64,6 +64,10 @@ struct macio_softc { vm_offset_t sc_base; vm_offset_t sc_size; struct rman sc_mem_rman; + + /* FCR registers */ + int sc_memrid; + struct resource *sc_memr; }; static MALLOC_DEFINE(M_MACIO, "macio", "macio device information"); @@ -288,6 +292,10 @@ macio_attach(device_t dev) sc->sc_base = reg[2]; sc->sc_size = MACIO_REG_SIZE; + sc->sc_memrid = PCIR_BAR(0); + sc->sc_memr = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->sc_memrid, RF_ACTIVE); + sc->sc_mem_rman.rm_type = RMAN_ARRAY; sc->sc_mem_rman.rm_descr = "MacIO Device Memory"; error = rman_init(&sc->sc_mem_rman); @@ -339,6 +347,29 @@ macio_attach(device_t dev) continue; } device_set_ivars(cdev, dinfo); + + /* Set FCRs to enable some devices */ + if (sc->sc_memr == NULL) + continue; + + if (strcmp(ofw_bus_get_name(cdev), "bmac") == 0 || + strcmp(ofw_bus_get_compat(cdev), "bmac+") == 0) { + uint32_t fcr; + + fcr = bus_read_4(sc->sc_memr, HEATHROW_FCR); + + fcr |= FCR_ENET_ENABLE & ~FCR_ENET_RESET; + bus_write_4(sc->sc_memr, HEATHROW_FCR, fcr); + DELAY(50000); + fcr |= FCR_ENET_RESET; + bus_write_4(sc->sc_memr, HEATHROW_FCR, fcr); + DELAY(50000); + fcr &= ~FCR_ENET_RESET; + bus_write_4(sc->sc_memr, HEATHROW_FCR, fcr); + DELAY(50000); + + bus_write_4(sc->sc_memr, HEATHROW_FCR, fcr); + } } return (bus_generic_attach(dev)); Modified: stable/8/sys/powerpc/powermac/maciovar.h ============================================================================== --- stable/8/sys/powerpc/powermac/maciovar.h Sun May 22 14:23:48 2011 (r222179) +++ stable/8/sys/powerpc/powermac/maciovar.h Sun May 22 15:01:02 2011 (r222180) @@ -38,6 +38,16 @@ #define MACIO_REG_SIZE 0x7ffff /* + * Feature Control Registers (FCR) + */ +#define HEATHROW_FCR 0x38 +#define KEYLARGO_FCR0 0x38 +#define KEYLARGO_FCR1 0x3c + +#define FCR_ENET_ENABLE 0x60000000 +#define FCR_ENET_RESET 0x80000000 + +/* * Format of a macio reg property entry. */ struct macio_reg { From owner-svn-src-all@FreeBSD.ORG Sun May 22 15:14:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD9E8106564A; Sun, 22 May 2011 15:14:21 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE5118FC0C; Sun, 22 May 2011 15:14:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MFELUq079526; Sun, 22 May 2011 15:14:21 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MFELme079524; Sun, 22 May 2011 15:14:21 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105221514.p4MFELme079524@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 May 2011 15:14:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222181 - stable/8/sys/powerpc/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 15:14:21 -0000 Author: nwhitehorn Date: Sun May 22 15:14:21 2011 New Revision: 222181 URL: http://svn.freebsd.org/changeset/base/222181 Log: MFC r221550: SMP has worked perfectly for a very long time on 32-bit PowerPC on both UP and SMP hardware. Enable it in GENERIC. Modified: stable/8/sys/powerpc/conf/GENERIC Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/powerpc/conf/GENERIC ============================================================================== --- stable/8/sys/powerpc/conf/GENERIC Sun May 22 15:01:02 2011 (r222180) +++ stable/8/sys/powerpc/conf/GENERIC Sun May 22 15:14:21 2011 (r222181) @@ -72,7 +72,7 @@ options KDB # Kernel debugger related options KDB_TRACE # Print a stack trace for a panic # To make an SMP kernel, the next line is needed -#options SMP # Symmetric MultiProcessor Kernel +options SMP # Symmetric MultiProcessor Kernel # CPU frequency control device cpufreq From owner-svn-src-all@FreeBSD.ORG Sun May 22 15:24:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 815B11065674; Sun, 22 May 2011 15:24:56 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 731F28FC1B; Sun, 22 May 2011 15:24:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MFOuMA079868; Sun, 22 May 2011 15:24:56 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MFOuKd079866; Sun, 22 May 2011 15:24:56 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105221524.p4MFOuKd079866@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 22 May 2011 15:24:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222182 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 15:24:56 -0000 Author: jilles Date: Sun May 22 15:24:56 2011 New Revision: 222182 URL: http://svn.freebsd.org/changeset/base/222182 Log: sh: Remove obsolete token type TENDBQUOTE. This token type was related to Almquist's original version of backquotes that could not nest and fell into disuse fairly soon. Modified: head/bin/sh/mktokens Modified: head/bin/sh/mktokens ============================================================================== --- head/bin/sh/mktokens Sun May 22 15:14:21 2011 (r222181) +++ head/bin/sh/mktokens Sun May 22 15:24:56 2011 (r222182) @@ -50,7 +50,6 @@ TPIPE 0 "|" TLP 0 "(" TRP 1 ")" TENDCASE 1 ";;" -TENDBQUOTE 1 "`" TREDIR 0 redirection TWORD 0 word TIF 0 "if" From owner-svn-src-all@FreeBSD.ORG Sun May 22 16:24:55 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C0CF106564A; Sun, 22 May 2011 16:24:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 4996B8FC13; Sun, 22 May 2011 16:24:55 +0000 (UTC) Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p4MGOpXe091443 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 22 May 2011 10:24:53 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20110522093302.GA2638@mole.fafoe.narf.at> Date: Sun, 22 May 2011 10:24:51 -0600 Content-Transfer-Encoding: 7bit Message-Id: <03BABBB2-56C2-48DD-898A-B25A8E4040F2@bsdimp.com> References: <201105152003.p4FK3tnS050889@svn.freebsd.org> <20110522093302.GA2638@mole.fafoe.narf.at> To: Stefan Farfeleder X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sun, 22 May 2011 10:24:53 -0600 (MDT) Cc: svn-src-head@FreeBSD.org, "Andrey V. Elsukov" , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 16:24:55 -0000 On May 22, 2011, at 3:33 AM, Stefan Farfeleder wrote: > On Sun, May 15, 2011 at 08:03:55PM +0000, Andrey V. Elsukov wrote: >> Author: ae >> Date: Sun May 15 20:03:54 2011 >> New Revision: 221972 >> URL: http://svn.freebsd.org/changeset/base/221972 >> >> Log: >> Add a sysctl kern.geom.part.check_integrity for those who has corrupt >> partition tables and lost an ability to boot after r221788. >> Also unhide an error message from bootverbose, this would help to >> easier determine the problem. > > So, what's the point of this check? It breaks mounting of all my USB > drives. Everyone now has to set this sysctl? Personally, I think it can be just deleted. I think it is wrong... Warner > da0 at umass-sim0 bus 0 scbus6 target 0 lun 0 > da0: Removable Direct Access SCSI-0 device > da0: 40.000MB/s transfers > da0: 15304MB (31342592 512 byte sectors: 255H 63S/T 1950C) > GEOM_PART: integrity check failed (da0, MBR) > > Stefan > > From owner-svn-src-all@FreeBSD.ORG Sun May 22 16:31:02 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DC24106566B; Sun, 22 May 2011 16:31:02 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 08DEE8FC08; Sun, 22 May 2011 16:31:01 +0000 (UTC) Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p4MGQFjL091449 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 22 May 2011 10:26:15 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Sun, 22 May 2011 10:26:14 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201105152003.p4FK3tnS050889@svn.freebsd.org> <20110522093302.GA2638@mole.fafoe.narf.at> To: Adrian Chadd X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sun, 22 May 2011 10:26:15 -0600 (MDT) Cc: svn-src-head@FreeBSD.ORG, "Andrey V. Elsukov" , svn-src-all@FreeBSD.ORG, Stefan Farfeleder , src-committers@FreeBSD.ORG Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 16:31:02 -0000 On May 22, 2011, at 7:03 AM, Adrian Chadd wrote: > This also bit me on embedded platform stuff. >=20 > Is it possible to disable this by default for now and have it just = warn loudly? > And/or hide the default value behind a kernel configuration variable > so we can disable it > (but still get the warnings) for now? Or just delete it entirely as a bad idea? We had this with Marcel's = warning for a long time that turned out to be utterly bogus so we = removed it. Warner >=20 > Thanks, >=20 >=20 > Adrian >=20 > On 22 May 2011 17:33, Stefan Farfeleder wrote: >> On Sun, May 15, 2011 at 08:03:55PM +0000, Andrey V. Elsukov wrote: >>> Author: ae >>> Date: Sun May 15 20:03:54 2011 >>> New Revision: 221972 >>> URL: http://svn.freebsd.org/changeset/base/221972 >>>=20 >>> Log: >>> Add a sysctl kern.geom.part.check_integrity for those who has = corrupt >>> partition tables and lost an ability to boot after r221788. >>> Also unhide an error message from bootverbose, this would help to >>> easier determine the problem. >>=20 >> So, what's the point of this check? It breaks mounting of all my USB >> drives. Everyone now has to set this sysctl? >>=20 >> da0 at umass-sim0 bus 0 scbus6 target 0 lun 0 >> da0: Removable Direct Access SCSI-0 device >> da0: 40.000MB/s transfers >> da0: 15304MB (31342592 512 byte sectors: 255H 63S/T 1950C) >> GEOM_PART: integrity check failed (da0, MBR) >>=20 >> Stefan >>=20 >=20 >=20 From owner-svn-src-all@FreeBSD.ORG Sun May 22 16:32:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44F29106566C; Sun, 22 May 2011 16:32:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36CCF8FC12; Sun, 22 May 2011 16:32:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MGWj9k081827; Sun, 22 May 2011 16:32:45 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MGWjUb081825; Sun, 22 May 2011 16:32:45 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201105221632.p4MGWjUb081825@svn.freebsd.org> From: Dimitry Andric Date: Sun, 22 May 2011 16:32:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222183 - head/lib/clang X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 16:32:45 -0000 Author: dim Date: Sun May 22 16:32:44 2011 New Revision: 222183 URL: http://svn.freebsd.org/changeset/base/222183 Log: On amd64, change clang's default triple to 'x86_64-unknown-freebsd9.0', similar to what we do for binutils. When clang's default triple starts with 'amd64-', it does not pass a proper -target-cpu option to its first stage. This can lead to problems, for example when structs are memcpy'd, and clang erroneously assumes they are 16-byte aligned. It will then use the 'movaps' SSE instruction to implement the copy, which results in a bus error if the struct is really 8-byte aligned. I encountered this issue when gcc's /usr/libexec/cc1 started crashing with SIGBUS, after rebuilding world with clang ToT, but it also affects the version of clang that we have in the tree. We were just lucky until now, apparently. :) Modified: head/lib/clang/clang.build.mk Modified: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Sun May 22 15:24:56 2011 (r222182) +++ head/lib/clang/clang.build.mk Sun May 22 16:32:44 2011 (r222183) @@ -15,7 +15,7 @@ CFLAGS+= -O1 TARGET_ARCH?= ${MACHINE_ARCH} # XXX: 8.0, to keep __FreeBSD_cc_version happy -CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH}-undermydesk-freebsd9.0\" +CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd9.0\" .ifndef LLVM_REQUIRES_EH CXXFLAGS+=-fno-exceptions From owner-svn-src-all@FreeBSD.ORG Sun May 22 16:37:07 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C2DB106566B; Sun, 22 May 2011 16:37:07 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 3D4D38FC1C; Sun, 22 May 2011 16:37:07 +0000 (UTC) Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p4MGWJ4v091485 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 22 May 2011 10:32:21 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Sun, 22 May 2011 10:32:19 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <38A0D352-30A8-47A0-8259-12B3B216401B@bsdimp.com> References: <201105152003.p4FK3tnS050889@svn.freebsd.org> <20110522093302.GA2638@mole.fafoe.narf.at> To: Adrian Chadd X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sun, 22 May 2011 10:32:21 -0600 (MDT) Cc: svn-src-head@FreeBSD.ORG, "Andrey V. Elsukov" , svn-src-all@FreeBSD.ORG, Stefan Farfeleder , src-committers@FreeBSD.ORG Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 16:37:07 -0000 After carefully reviewing this code, we need to have it be *OFF* by = default. It should also explain *WHY* it is rejecting the partition. = It isn't clear to me at all that this is even useful. While different = than Marcel's warnings, I think we need to take a very cautious approach = here. Where was this even talked about before the fact? It seems like = a fairly radical enforcement action to just spring on people, especially = now in light of it having so many false positives. Warner On May 22, 2011, at 7:03 AM, Adrian Chadd wrote: > This also bit me on embedded platform stuff. >=20 > Is it possible to disable this by default for now and have it just = warn loudly? > And/or hide the default value behind a kernel configuration variable > so we can disable it > (but still get the warnings) for now? >=20 > Thanks, >=20 >=20 > Adrian >=20 > On 22 May 2011 17:33, Stefan Farfeleder wrote: >> On Sun, May 15, 2011 at 08:03:55PM +0000, Andrey V. Elsukov wrote: >>> Author: ae >>> Date: Sun May 15 20:03:54 2011 >>> New Revision: 221972 >>> URL: http://svn.freebsd.org/changeset/base/221972 >>>=20 >>> Log: >>> Add a sysctl kern.geom.part.check_integrity for those who has = corrupt >>> partition tables and lost an ability to boot after r221788. >>> Also unhide an error message from bootverbose, this would help to >>> easier determine the problem. >>=20 >> So, what's the point of this check? It breaks mounting of all my USB >> drives. Everyone now has to set this sysctl? >>=20 >> da0 at umass-sim0 bus 0 scbus6 target 0 lun 0 >> da0: Removable Direct Access SCSI-0 device >> da0: 40.000MB/s transfers >> da0: 15304MB (31342592 512 byte sectors: 255H 63S/T 1950C) >> GEOM_PART: integrity check failed (da0, MBR) >>=20 >> Stefan >>=20 >=20 >=20 From owner-svn-src-all@FreeBSD.ORG Sun May 22 16:43:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 9D078106566C; Sun, 22 May 2011 16:43:09 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 9D7D714D80B; Sun, 22 May 2011 16:43:06 +0000 (UTC) Message-ID: <4DD93D14.1010908@FreeBSD.org> Date: Sun, 22 May 2011 20:43:00 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 MIME-Version: 1.0 To: Stefan Farfeleder References: <201105152003.p4FK3tnS050889@svn.freebsd.org> <20110522093302.GA2638@mole.fafoe.narf.at> In-Reply-To: <20110522093302.GA2638@mole.fafoe.narf.at> X-Enigmail-Version: 1.1.2 OpenPGP: id=10C8A17A Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig04740255C2DC18196E3A7C58" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 16:43:09 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig04740255C2DC18196E3A7C58 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On 22.05.2011 13:33, Stefan Farfeleder wrote: >> URL: http://svn.freebsd.org/changeset/base/221972 >> >> Log: >> Add a sysctl kern.geom.part.check_integrity for those who has corrup= t >> partition tables and lost an ability to boot after r221788. >> Also unhide an error message from bootverbose, this would help to >> easier determine the problem. >=20 > So, what's the point of this check? It breaks mounting of all my USB > drives. Everyone now has to set this sysctl? As described in r221788, this check is targeted to prevent usage of incorrect on-disk metadata. And this sysctl is a temporary workaround. And i do not use it, all my disks and partitions are accessible as before= =2E --=20 WBR, Andrey V. Elsukov --------------enig04740255C2DC18196E3A7C58 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iQEcBAEBAgAGBQJN2T0YAAoJEAHF6gQQyKF6II8H/joYP0GuGgAAXWHwTzXAEx5v WiDakIcmW/7UC6HBqeCrfLQHaO4LQYAG94K0mwcIBjNkHXHcBqjHOhKUgjOMUxlL Lf5SrV62WF32n6Bqy+fNsNTD2W27eERdJm+wGgC2t9Ec4SgIc/swNE/gmpGx0e0a LfQcSjBK+RSOql5ymaplehK8A1McgmiCekQkGiVZp1XX8Hke2zUyaRq+0ecDrCYZ WQHSKLKEqCtPmATkgptpowwRAm8zU4aE3UQQ/sVmuDeMi3DmlwRiHwBB3QG7fKhH xYJbOgnRWLBEJXH9bNolLqmGQ/3kshPUXhaZAaL5mxjfRxiyC673et4pqjzOxqw= =txVb -----END PGP SIGNATURE----- --------------enig04740255C2DC18196E3A7C58-- From owner-svn-src-all@FreeBSD.ORG Sun May 22 16:46:32 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AA4A1065678; Sun, 22 May 2011 16:46:32 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id B58EB8FC15; Sun, 22 May 2011 16:46:31 +0000 (UTC) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 2D7285DC0; Sun, 22 May 2011 16:46:30 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.4/8.14.4) with ESMTP id p4MGkTGn003672; Sun, 22 May 2011 16:46:29 GMT (envelope-from phk@critter.freebsd.dk) To: Warner Losh From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 22 May 2011 10:32:19 CST." <38A0D352-30A8-47A0-8259-12B3B216401B@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1 Date: Sun, 22 May 2011 16:46:29 +0000 Message-ID: <3671.1306082789@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Adrian Chadd , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, "Andrey V. Elsukov" , Stefan Farfeleder , svn-src-head@FreeBSD.ORG Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 16:46:32 -0000 In message <38A0D352-30A8-47A0-8259-12B3B216401B@bsdimp.com>, Warner Losh write s: >After carefully reviewing this code, we need to have it be *OFF* by >default. It should also explain *WHY* it is rejecting the partition. >It isn't clear to me at all that this is even useful. Seconded * 3. My experience so far is that 1 out of in 7 USB flash devices worked with these paranoid checks enabled. What happened to the Robustness Principle ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-svn-src-all@FreeBSD.ORG Sun May 22 17:04:54 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 83A8E1065673; Sun, 22 May 2011 17:04:54 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id B5818150380; Sun, 22 May 2011 17:04:52 +0000 (UTC) Message-ID: <4DD94232.7060607@FreeBSD.org> Date: Sun, 22 May 2011 21:04:50 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 MIME-Version: 1.0 To: Warner Losh References: <201105152003.p4FK3tnS050889@svn.freebsd.org> <20110522093302.GA2638@mole.fafoe.narf.at> <38A0D352-30A8-47A0-8259-12B3B216401B@bsdimp.com> In-Reply-To: <38A0D352-30A8-47A0-8259-12B3B216401B@bsdimp.com> X-Enigmail-Version: 1.1.2 OpenPGP: id=10C8A17A Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig81A11110392054029A3396E7" Cc: svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG, Adrian Chadd , Stefan Farfeleder , src-committers@FreeBSD.ORG Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 17:04:54 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig81A11110392054029A3396E7 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On 22.05.2011 20:32, Warner Losh wrote: > After carefully reviewing this code, we need to have it be *OFF* by > default. It should also explain *WHY* it is rejecting the partition. Did you reviewed r221992? > It isn't clear to me at all that this is even useful. While > different than Marcel's warnings, I think we need to take a very > cautious approach here. Where was this even talked about before the > fact? It seems like a fairly radical enforcement action to just > spring on people, especially now in light of it having so many false > positives. On the other hand now we know that many users have this problem, and we have time to properly fix it before release :) --=20 WBR, Andrey V. Elsukov --------------enig81A11110392054029A3396E7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iQEcBAEBAgAGBQJN2UIyAAoJEAHF6gQQyKF6zdQIAMBmrAWAFISkdi/qiw80Wrab YneOxRx+rVJAQdS3RKwJDLftepBS0K9c/zjlDTai3Asx8Oh48A6Pkfy1nMcKOKPm 2/mYos8vFxSMT7PVb7bbe5WW6TPNmE7CcguHGp/StjwAl9HSa7hlfN3ApiLxaFCr EZQ1a1BQzm6CQChk11KpuCsmjdNKOW5wlMVzavP8l0AVejvfIqlV6D1mlJv4DIhH SkbbxKES9y+89CxdSUIl6Y2doAxzM3ri+pjhQMXb20W1/TFaDKJvr1e65y+lgMEA Lf9qEzcOjXU1WQVX6GRbRGT+eOoBe/4SZNPPeZIXvUvYj4AWhJ6RVCLmnuvWWxw= =rC5p -----END PGP SIGNATURE----- --------------enig81A11110392054029A3396E7-- From owner-svn-src-all@FreeBSD.ORG Sun May 22 17:46:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97AE6106564A; Sun, 22 May 2011 17:46:16 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89E858FC12; Sun, 22 May 2011 17:46:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MHkG5P084086; Sun, 22 May 2011 17:46:16 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MHkGi1084084; Sun, 22 May 2011 17:46:16 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201105221746.p4MHkGi1084084@svn.freebsd.org> From: Alan Cox Date: Sun, 22 May 2011 17:46:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222184 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 17:46:16 -0000 Author: alc Date: Sun May 22 17:46:16 2011 New Revision: 222184 URL: http://svn.freebsd.org/changeset/base/222184 Log: Correct an error in r222163. Unless UMA_MD_SMALL_ALLOC is defined, startup_alloc() must be used until uma_startup2() is called. Reported by: jh Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Sun May 22 16:32:44 2011 (r222183) +++ head/sys/vm/uma_core.c Sun May 22 17:46:16 2011 (r222184) @@ -1318,9 +1318,13 @@ keg_ctor(void *mem, int size, void *udat #ifdef UMA_MD_SMALL_ALLOC keg->uk_allocf = uma_small_alloc; keg->uk_freef = uma_small_free; -#endif + if (booted < UMA_STARTUP) keg->uk_allocf = startup_alloc; +#else + if (booted < UMA_STARTUP2) + keg->uk_allocf = startup_alloc; +#endif } else if (booted < UMA_STARTUP2 && (keg->uk_flags & UMA_ZFLAG_INTERNAL)) keg->uk_allocf = startup_alloc; From owner-svn-src-all@FreeBSD.ORG Sun May 22 18:01:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDEAA106564A; Sun, 22 May 2011 18:01:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E9558FC0C; Sun, 22 May 2011 18:01:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MI1qtT084589; Sun, 22 May 2011 18:01:52 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MI1qxv084585; Sun, 22 May 2011 18:01:52 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201105221801.p4MI1qxv084585@svn.freebsd.org> From: Warner Losh Date: Sun, 22 May 2011 18:01:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222185 - in head: share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 18:01:52 -0000 Author: imp Date: Sun May 22 18:01:52 2011 New Revision: 222185 URL: http://svn.freebsd.org/changeset/base/222185 Log: Start to usher INSTALL_NODEBUG hack out the door. Add new WITH{OUT,}_KERNEL_SYMBOLS (defaulting to WITH). In the fullness of time, likely around 2020, INSTALL_NODEBUG will be removed. For now, don't print a warning when using INSTALL_NODEBUG, but that will be coming soon. Modified: head/share/mk/bsd.own.mk head/sys/conf/kern.post.mk head/sys/conf/kmod.mk Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Sun May 22 17:46:16 2011 (r222184) +++ head/share/mk/bsd.own.mk Sun May 22 18:01:52 2011 (r222185) @@ -335,6 +335,7 @@ __DEFAULT_YES_OPTIONS = \ IPX \ JAIL \ KERBEROS \ + KERNEL_SYMBOLS \ KVM \ LEGACY_CONSOLE \ LIB32 \ Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Sun May 22 17:46:16 2011 (r222184) +++ head/sys/conf/kern.post.mk Sun May 22 18:01:52 2011 (r222185) @@ -227,7 +227,7 @@ kernel-install: .endif mkdir -p ${DESTDIR}${KODIR} ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR} -.if defined(DEBUG) && !defined(INSTALL_NODEBUG) +.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} == "yes" ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} .endif .if defined(KERNEL_EXTRA_INSTALL) @@ -239,7 +239,7 @@ kernel-install: kernel-reinstall: @-chflags -R noschg ${DESTDIR}${KODIR} ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR} -.if defined(DEBUG) && !defined(INSTALL_NODEBUG) +.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} == "yes" ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} .endif Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Sun May 22 17:46:16 2011 (r222184) +++ head/sys/conf/kmod.mk Sun May 22 18:01:52 2011 (r222185) @@ -286,7 +286,7 @@ realinstall: _kmodinstall _kmodinstall: ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR} -.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) +.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} == "yes" ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ ${_INSTALLFLAGS} ${PROG}.symbols ${DESTDIR}${KMODDIR} .endif From owner-svn-src-all@FreeBSD.ORG Sun May 22 18:09:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBF8C106564A; Sun, 22 May 2011 18:09:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4C378FC16; Sun, 22 May 2011 18:09:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MI9pno084846; Sun, 22 May 2011 18:09:51 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MI9plO084843; Sun, 22 May 2011 18:09:51 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201105221809.p4MI9plO084843@svn.freebsd.org> From: Warner Losh Date: Sun, 22 May 2011 18:09:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222186 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 18:09:52 -0000 Author: imp Date: Sun May 22 18:09:51 2011 New Revision: 222186 URL: http://svn.freebsd.org/changeset/base/222186 Log: Backwards compatibility hacks to allow kernels to be built via config wihtout updating world (good transition aide for -current, but also allows kernels to be built on -stable the old way too). This likely should go away around FreeBSD 10.0 or so. Modified: head/sys/conf/kern.post.mk head/sys/conf/kmod.mk Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Sun May 22 18:01:52 2011 (r222185) +++ head/sys/conf/kern.post.mk Sun May 22 18:09:51 2011 (r222186) @@ -227,7 +227,8 @@ kernel-install: .endif mkdir -p ${DESTDIR}${KODIR} ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR} -.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} == "yes" +.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && \ + (defined(MK_KERNEL_SYMBOLS) && ${MK_KERNEL_SYMBOLS} == "yes") ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} .endif .if defined(KERNEL_EXTRA_INSTALL) @@ -239,7 +240,8 @@ kernel-install: kernel-reinstall: @-chflags -R noschg ${DESTDIR}${KODIR} ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR} -.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} == "yes" +.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && \ + (defined(MK_KERNEL_SYMBOLS) && ${MK_KERNEL_SYMBOLS} == "yes") ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} .endif Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Sun May 22 18:01:52 2011 (r222185) +++ head/sys/conf/kmod.mk Sun May 22 18:09:51 2011 (r222186) @@ -286,7 +286,8 @@ realinstall: _kmodinstall _kmodinstall: ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR} -.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} == "yes" +.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && \ + (defined(MK_KERNEL_SYMBOLS) && ${MK_KERNEL_SYMBOLS} == "yes") ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ ${_INSTALLFLAGS} ${PROG}.symbols ${DESTDIR}${KMODDIR} .endif From owner-svn-src-all@FreeBSD.ORG Sun May 22 18:11:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68842106564A; Sun, 22 May 2011 18:11:41 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A7558FC12; Sun, 22 May 2011 18:11:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MIBf2M084961; Sun, 22 May 2011 18:11:41 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MIBfjS084958; Sun, 22 May 2011 18:11:41 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201105221811.p4MIBfjS084958@svn.freebsd.org> From: Alan Cox Date: Sun, 22 May 2011 18:11:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222187 - in head/sys: fs/nfsclient nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 18:11:41 -0000 Author: alc Date: Sun May 22 18:11:41 2011 New Revision: 222187 URL: http://svn.freebsd.org/changeset/base/222187 Log: Eliminate duplicate #include's. Modified: head/sys/fs/nfsclient/nfs_clvnops.c head/sys/nfsclient/nfs_vnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Sun May 22 18:09:51 2011 (r222186) +++ head/sys/fs/nfsclient/nfs_clvnops.c Sun May 22 18:11:41 2011 (r222187) @@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Sun May 22 18:09:51 2011 (r222186) +++ head/sys/nfsclient/nfs_vnops.c Sun May 22 18:11:41 2011 (r222187) @@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include From owner-svn-src-all@FreeBSD.ORG Sun May 22 18:12:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95121106566B; Sun, 22 May 2011 18:12:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 874D38FC1B; Sun, 22 May 2011 18:12:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MICxWX085036; Sun, 22 May 2011 18:12:59 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MICxet085035; Sun, 22 May 2011 18:12:59 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201105221812.p4MICxet085035@svn.freebsd.org> From: Warner Losh Date: Sun, 22 May 2011 18:12:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222188 - head/tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 18:12:59 -0000 Author: imp Date: Sun May 22 18:12:59 2011 New Revision: 222188 URL: http://svn.freebsd.org/changeset/base/222188 Log: Add documentation for WITHOUT_KERNEL_SYMBOLS Added: head/tools/build/options/WITHOUT_KERNEL_SYMBOLS (contents, props changed) Added: head/tools/build/options/WITHOUT_KERNEL_SYMBOLS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_KERNEL_SYMBOLS Sun May 22 18:12:59 2011 (r222188) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not install kernel symbol files. +This option is recommended for those people who have small root partitions. + From owner-svn-src-all@FreeBSD.ORG Sun May 22 18:23:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D985106566C; Sun, 22 May 2011 18:23:17 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8FC678FC13; Sun, 22 May 2011 18:23:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MINH9p085365; Sun, 22 May 2011 18:23:17 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MINHav085363; Sun, 22 May 2011 18:23:17 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201105221823.p4MINHav085363@svn.freebsd.org> From: Warner Losh Date: Sun, 22 May 2011 18:23:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222189 - head/tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 18:23:17 -0000 Author: imp Date: Sun May 22 18:23:17 2011 New Revision: 222189 URL: http://svn.freebsd.org/changeset/base/222189 Log: Add the description properly... Modified: head/tools/build/options/WITHOUT_KERNEL_SYMBOLS Modified: head/tools/build/options/WITHOUT_KERNEL_SYMBOLS ============================================================================== --- head/tools/build/options/WITHOUT_KERNEL_SYMBOLS Sun May 22 18:12:59 2011 (r222188) +++ head/tools/build/options/WITHOUT_KERNEL_SYMBOLS Sun May 22 18:23:17 2011 (r222189) @@ -1,4 +1,5 @@ .\" $FreeBSD$ Set to not install kernel symbol files. +.Bf -symbolic This option is recommended for those people who have small root partitions. - +.Ef From owner-svn-src-all@FreeBSD.ORG Sun May 22 18:34:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 923401065673; Sun, 22 May 2011 18:34:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6AB8F8FC13; Sun, 22 May 2011 18:34:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MIYBOb085715; Sun, 22 May 2011 18:34:11 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MIYBRm085713; Sun, 22 May 2011 18:34:11 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201105221834.p4MIYBRm085713@svn.freebsd.org> From: Warner Losh Date: Sun, 22 May 2011 18:34:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222190 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 18:34:11 -0000 Author: imp Date: Sun May 22 18:34:11 2011 New Revision: 222190 URL: http://svn.freebsd.org/changeset/base/222190 Log: regen Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sun May 22 18:23:17 2011 (r222189) +++ head/share/man/man5/src.conf.5 Sun May 22 18:34:11 2011 (r222190) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 221733 2011-05-10 13:01:11Z ru .\" $FreeBSD$ -.Dd May 17, 2011 +.Dd May 22, 2011 .Dt SRC.CONF 5 .Os .Sh NAME @@ -206,6 +206,14 @@ and .\" from FreeBSD: head/tools/build/options/WITH_BIND_XML 193280 2009-06-01 21:58:59Z dougb Set to enable the http statistics interface for named. This requires ports/textproc/libxml2 to be installed in /usr/local. +.It Va WITHOUT_BINUTILS +.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS 222090 2011-05-19 05:13:25Z imp +Set to not install binutils (as, c++-filt, gconv, gnu-ar, gnu-randlib, +ld, nm, objcopy, objdump, readelf, size and strip) +.Bf -symbolic +The option does not generally work for build targets, unless some alternative +toolchain is enabled. +.Ef .It Va WITHOUT_BLUETOOTH .\" from FreeBSD: head/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 07:50:50Z ru Set to not build Bluetooth related kernel modules, programs and libraries. @@ -364,6 +372,13 @@ Set to not build .It Va WITHOUT_GAMES .\" from FreeBSD: head/tools/build/options/WITHOUT_GAMES 156932 2006-03-21 07:50:50Z ru Set to not build games. +.It Va WITHOUT_GCC +.\" from FreeBSD: head/tools/build/options/WITHOUT_GCC 222090 2011-05-19 05:13:25Z imp +Set to not install gcc and g++. +.Bf -symbolic +The option does not generally work for build targets, unless some alternative +toolchain is enabled. +.Ef .It Va WITHOUT_GCOV .\" from FreeBSD: head/tools/build/options/WITHOUT_GCOV 156932 2006-03-21 07:50:50Z ru Set to not build the @@ -512,6 +527,12 @@ Set to build some programs without Kerbe .Xr sshd 8 , and .Xr telnetd 8 . +.It Va WITHOUT_KERNEL_SYMBOLS +.\" from FreeBSD: head/tools/build/options/WITHOUT_KERNEL_SYMBOLS 222189 2011-05-22 18:23:17Z imp +Set to not install kernel symbol files. +.Bf -symbolic +This option is recommended for those people who have small root partitions. +.Ef .It Va WITHOUT_KVM .\" from FreeBSD: head/tools/build/options/WITHOUT_KVM 174550 2007-12-12 16:43:17Z ru Set to not build the @@ -884,8 +905,12 @@ When set, it also enforces the following .Pp .Bl -item -compact .It +.Va WITHOUT_BINUTILS +.It .Va WITHOUT_CLANG .It +.Va WITHOUT_GCC +.It .Va WITHOUT_GDB .El .It Va WITHOUT_USB From owner-svn-src-all@FreeBSD.ORG Sun May 22 19:56:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 341381065670; Sun, 22 May 2011 19:56:15 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 247788FC0C; Sun, 22 May 2011 19:56:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MJuFWb088175; Sun, 22 May 2011 19:56:15 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MJuEEQ088170; Sun, 22 May 2011 19:56:14 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105221956.p4MJuEEQ088170@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 May 2011 19:56:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222191 - in head/usr.sbin/makefs: . cd9660 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 19:56:15 -0000 Author: nwhitehorn Date: Sun May 22 19:56:14 2011 New Revision: 222191 URL: http://svn.freebsd.org/changeset/base/222191 Log: Add analogs to the -chrp-boot and -prep-boot options to mkisofs. Modified: head/usr.sbin/makefs/cd9660.c head/usr.sbin/makefs/cd9660.h head/usr.sbin/makefs/cd9660/cd9660_eltorito.c head/usr.sbin/makefs/makefs.8 Modified: head/usr.sbin/makefs/cd9660.c ============================================================================== --- head/usr.sbin/makefs/cd9660.c Sun May 22 18:34:11 2011 (r222190) +++ head/usr.sbin/makefs/cd9660.c Sun May 22 19:56:14 2011 (r222191) @@ -207,6 +207,7 @@ cd9660_set_defaults(void) diskStructure.rr_moved_dir = 0; diskStructure.archimedes_enabled = 0; + diskStructure.chrp_boot = 0; diskStructure.include_padding_areas = 1; @@ -391,6 +392,8 @@ cd9660_parse_opts(const char *option, fs diskStructure.rock_ridge_enabled = 1; else if (CD9660_IS_COMMAND_ARG_DUAL(var, "A", "archimedes")) diskStructure.archimedes_enabled = 1; + else if (CD9660_IS_COMMAND_ARG(var, "chrp-boot")) + diskStructure.chrp_boot = 1; else if (CD9660_IS_COMMAND_ARG_DUAL(var, "K", "keep-bad-images")) diskStructure.keep_bad_images = 1; else if (CD9660_IS_COMMAND_ARG(var, "allow-deep-trees")) Modified: head/usr.sbin/makefs/cd9660.h ============================================================================== --- head/usr.sbin/makefs/cd9660.h Sun May 22 18:34:11 2011 (r222190) +++ head/usr.sbin/makefs/cd9660.h Sun May 22 19:56:14 2011 (r222191) @@ -285,6 +285,7 @@ typedef struct _iso9660_disk { cd9660node *rr_moved_dir; int archimedes_enabled; + int chrp_boot; /* Spec breaking options */ u_char allow_deep_trees; Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c ============================================================================== --- head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Sun May 22 18:34:11 2011 (r222190) +++ head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Sun May 22 19:56:14 2011 (r222191) @@ -32,7 +32,7 @@ * OF SUCH DAMAGE. */ -#include +#include #include "cd9660.h" #include "cd9660_eltorito.h" @@ -501,27 +501,62 @@ cd9660_setup_boot_volume_descriptor(volu } static int +cd9660_write_mbr_partition_entry(FILE *fd, int index, off_t sector_start, + off_t nsectors, int type) +{ + uint8_t val; + uint32_t lba; + + fseeko(fd, (off_t)(index) * 16 + 0x1be, SEEK_SET); + + val = 0x80; /* Bootable */ + fwrite(&val, sizeof(val), 1, fd); + + val = 0xff; /* CHS begin */ + fwrite(&val, sizeof(val), 1, fd); + fwrite(&val, sizeof(val), 1, fd); + fwrite(&val, sizeof(val), 1, fd); + + val = type; /* Part type */ + fwrite(&val, sizeof(val), 1, fd); + + val = 0xff; /* CHS end */ + fwrite(&val, sizeof(val), 1, fd); + fwrite(&val, sizeof(val), 1, fd); + fwrite(&val, sizeof(val), 1, fd); + + /* LBA extent */ + lba = htole32(sector_start); + fwrite(&lba, sizeof(lba), 1, fd); + lba = htole32(nsectors); + fwrite(&lba, sizeof(lba), 1, fd); + + return (0); +} + +static int cd9660_write_apm_partition_entry(FILE *fd, int index, int total_partitions, off_t sector_start, off_t nsectors, off_t sector_size, - const char *part_name, const char *part_type) { + const char *part_name, const char *part_type) +{ uint32_t apm32; uint16_t apm16; fseeko(fd, (off_t)(index + 1) * sector_size, SEEK_SET); /* Signature */ - apm16 = htons(0x504d); + apm16 = htobe16(0x504d); fwrite(&apm16, sizeof(apm16), 1, fd); apm16 = 0; fwrite(&apm16, sizeof(apm16), 1, fd); /* Total number of partitions */ - apm32 = htonl(total_partitions); + apm32 = htobe32(total_partitions); fwrite(&apm32, sizeof(apm32), 1, fd); /* Bounds */ - apm32 = htonl(sector_start); + apm32 = htobe32(sector_start); fwrite(&apm32, sizeof(apm32), 1, fd); - apm32 = htonl(nsectors); + apm32 = htobe32(nsectors); fwrite(&apm32, sizeof(apm32), 1, fd); fwrite(part_name, strlen(part_name) + 1, 1, fd); @@ -537,6 +572,7 @@ cd9660_write_boot(FILE *fd) struct boot_catalog_entry *e; struct cd9660_boot_image *t; int apm_partitions = 0; + int mbr_partitions = 0; /* write boot catalog */ if (fseeko(fd, (off_t)diskStructure.boot_catalog_sector * @@ -571,6 +607,35 @@ cd9660_write_boot(FILE *fd) if (t->system == ET_SYS_MAC) apm_partitions++; + if (t->system == ET_SYS_PPC) + mbr_partitions++; + } + + /* some systems need partition tables as well */ + if (mbr_partitions > 0 || diskStructure.chrp_boot) { + uint16_t sig; + + fseek(fd, 0x1fe, SEEK_SET); + sig = htole16(0xaa55); + fwrite(&sig, sizeof(sig), 1, fd); + + mbr_partitions = 0; + + /* Write ISO9660 descriptor, enclosing the whole disk */ + if (diskStructure.chrp_boot) + cd9660_write_mbr_partition_entry(fd, mbr_partitions++, + 0, diskStructure.totalSectors * + (diskStructure.sectorSize / 512), 0x96); + + /* Write all partition entries */ + TAILQ_FOREACH(t, &diskStructure.boot_images, image_list) { + if (t->system != ET_SYS_PPC) + continue; + cd9660_write_mbr_partition_entry(fd, mbr_partitions++, + t->sector * (diskStructure.sectorSize / 512), + t->num_sectors * (diskStructure.sectorSize / 512), + 0x41 /* PReP Boot */); + } } if (apm_partitions > 0) { @@ -580,17 +645,17 @@ cd9660_write_boot(FILE *fd) int total_parts; fseek(fd, 0, SEEK_SET); - apm16 = htons(0x4552); + apm16 = htobe16(0x4552); fwrite(&apm16, sizeof(apm16), 1, fd); /* Device block size */ - apm16 = htons(512); + apm16 = htobe16(512); fwrite(&apm16, sizeof(apm16), 1, fd); /* Device block count */ - apm32 = htonl(diskStructure.totalSectors * + apm32 = htobe32(diskStructure.totalSectors * (diskStructure.sectorSize / 512)); fwrite(&apm32, sizeof(apm32), 1, fd); /* Device type/id */ - apm16 = htons(1); + apm16 = htobe16(1); fwrite(&apm16, sizeof(apm16), 1, fd); fwrite(&apm16, sizeof(apm16), 1, fd); Modified: head/usr.sbin/makefs/makefs.8 ============================================================================== --- head/usr.sbin/makefs/makefs.8 Sun May 22 18:34:11 2011 (r222190) +++ head/usr.sbin/makefs/makefs.8 Sun May 22 19:56:14 2011 (r222191) @@ -285,6 +285,9 @@ Use the extension to encode .Tn RISC OS metadata. +.It Sy chrp-boot +Write an MBR partition table to the image to allow older CHRP hardware to +boot. .It Sy boot-load-segment Set load segment for the boot image. .It Sy bootimage From owner-svn-src-all@FreeBSD.ORG Sun May 22 20:22:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 404CA106566B; Sun, 22 May 2011 20:22:58 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [46.28.110.116]) by mx1.freebsd.org (Postfix) with ESMTP id 03E508FC13; Sun, 22 May 2011 20:22:57 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 67D737F382E; Sun, 22 May 2011 22:22:56 +0200 (CEST) Date: Sun, 22 May 2011 22:22:56 +0200 From: Roman Divacky To: Dimitry Andric Message-ID: <20110522202256.GA43412@freebsd.org> References: <201105221632.p4MGWjUb081825@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201105221632.p4MGWjUb081825@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r222183 - head/lib/clang X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 20:22:58 -0000 The problem here is deeper in my opinion. What FreeBSD calls amd64 the rest of the world (ie. linux) calls x86_64, I think that instead of this we should teach llvm/clang about "amd64". Maybe as a FreeBSD-only diff. The machine part of the triple is used in more places and this hack only is not the complete solution imho. On Sun, May 22, 2011 at 04:32:45PM +0000, Dimitry Andric wrote: > Author: dim > Date: Sun May 22 16:32:44 2011 > New Revision: 222183 > URL: http://svn.freebsd.org/changeset/base/222183 > > Log: > On amd64, change clang's default triple to 'x86_64-unknown-freebsd9.0', > similar to what we do for binutils. When clang's default triple starts > with 'amd64-', it does not pass a proper -target-cpu option to its > first stage. > > This can lead to problems, for example when structs are memcpy'd, and > clang erroneously assumes they are 16-byte aligned. It will then use > the 'movaps' SSE instruction to implement the copy, which results in a > bus error if the struct is really 8-byte aligned. > > I encountered this issue when gcc's /usr/libexec/cc1 started crashing > with SIGBUS, after rebuilding world with clang ToT, but it also affects > the version of clang that we have in the tree. We were just lucky until > now, apparently. :) > > Modified: > head/lib/clang/clang.build.mk > > Modified: head/lib/clang/clang.build.mk > ============================================================================== > --- head/lib/clang/clang.build.mk Sun May 22 15:24:56 2011 (r222182) > +++ head/lib/clang/clang.build.mk Sun May 22 16:32:44 2011 (r222183) > @@ -15,7 +15,7 @@ CFLAGS+= -O1 > > TARGET_ARCH?= ${MACHINE_ARCH} > # XXX: 8.0, to keep __FreeBSD_cc_version happy > -CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH}-undermydesk-freebsd9.0\" > +CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd9.0\" > > .ifndef LLVM_REQUIRES_EH > CXXFLAGS+=-fno-exceptions From owner-svn-src-all@FreeBSD.ORG Sun May 22 20:28:51 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C5F0106564A; Sun, 22 May 2011 20:28:51 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id 599658FC15; Sun, 22 May 2011 20:28:51 +0000 (UTC) Received: from dhcp-192-168-2-22.wifi.xcllnt.net (atm.xcllnt.net [70.36.220.6]) (authenticated bits=0) by mail.xcllnt.net (8.14.4/8.14.4) with ESMTP id p4MKSZh8010730 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 22 May 2011 13:28:42 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Marcel Moolenaar In-Reply-To: Date: Sun, 22 May 2011 13:28:35 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <6AE10D76-AC2F-4D7B-A985-EE072949ECC4@xcllnt.net> References: <201105152003.p4FK3tnS050889@svn.freebsd.org> <20110522093302.GA2638@mole.fafoe.narf.at> To: Warner Losh X-Mailer: Apple Mail (2.1084) Cc: Adrian Chadd , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, "Andrey V. Elsukov" , Stefan Farfeleder , svn-src-head@FreeBSD.org Subject: Re: svn commit: r221972 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 20:28:51 -0000 On May 22, 2011, at 9:26 AM, Warner Losh wrote: >=20 > On May 22, 2011, at 7:03 AM, Adrian Chadd wrote: >=20 >> This also bit me on embedded platform stuff. >>=20 >> Is it possible to disable this by default for now and have it just = warn loudly? >> And/or hide the default value behind a kernel configuration variable >> so we can disable it >> (but still get the warnings) for now? >=20 > Or just delete it entirely as a bad idea? We had this with Marcel's = warning for a long time that turned out to be utterly bogus so we = removed it. Really? The warning wasn't bogus. It was there to help us understand what was going on and we found over time that it was a harmless condition. That's why we removed the warning. The warning was good to raise awareness. This is in no way similar to what we have now. Here we have to deal with broken and fundamentally invalid MBRs that has caused us harm before and we're trying to do something sensible. As it turns out, a whole bunch of people have invalid MBRs, probably caused by crappy tools. Now what do you suggest we should do? Accept it silently and suffer the consequences later, should we raise awareness so that administrators can try and fix things or should we reject the MBR out of pedanticism? Rather than just calling it a bad idea, why not come up with something constructive? --=20 Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-all@FreeBSD.ORG Sun May 22 20:39:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54D51106564A; Sun, 22 May 2011 20:39:08 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 45AD78FC08; Sun, 22 May 2011 20:39:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MKd8ff089649; Sun, 22 May 2011 20:39:08 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MKd8dQ089647; Sun, 22 May 2011 20:39:08 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105222039.p4MKd8dQ089647@svn.freebsd.org> From: Rick Macklem Date: Sun, 22 May 2011 20:39:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222196 - head/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 20:39:08 -0000 Author: rmacklem Date: Sun May 22 20:39:07 2011 New Revision: 222196 URL: http://svn.freebsd.org/changeset/base/222196 Log: Fix the ufs/ffs file system so that it uses the lock flags argument added to VFS_FHTOVP() by r222167. Reviewed by: mckusick Modified: head/sys/ufs/ufs/ufs_vfsops.c Modified: head/sys/ufs/ufs/ufs_vfsops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vfsops.c Sun May 22 20:29:47 2011 (r222195) +++ head/sys/ufs/ufs/ufs_vfsops.c Sun May 22 20:39:07 2011 (r222196) @@ -218,7 +218,7 @@ ufs_fhtovp(mp, ufhp, flags, vpp) struct vnode *nvp; int error; - error = VFS_VGET(mp, ufhp->ufid_ino, LK_EXCLUSIVE, &nvp); + error = VFS_VGET(mp, ufhp->ufid_ino, flags, &nvp); if (error) { *vpp = NULLVP; return (error); From owner-svn-src-all@FreeBSD.ORG Sun May 22 20:41:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 173EE1065670; Sun, 22 May 2011 20:41:17 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 65-241-43-5.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id E49E8151136; Sun, 22 May 2011 20:41:14 +0000 (UTC) Message-ID: <4DD974E9.8040000@FreeBSD.org> Date: Sun, 22 May 2011 13:41:13 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 MIME-Version: 1.0 To: Roman Divacky References: <201105221632.p4MGWjUb081825@svn.freebsd.org> <20110522202256.GA43412@freebsd.org> In-Reply-To: <20110522202256.GA43412@freebsd.org> X-Enigmail-Version: 1.1.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric Subject: Re: svn commit: r222183 - head/lib/clang X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 20:41:17 -0000 On 05/22/2011 13:22, Roman Divacky wrote: > The problem here is deeper in my opinion. What FreeBSD calls > amd64 the rest of the world (ie. linux) calls x86_64, I think > that instead of this we should teach llvm/clang about "amd64". > Maybe as a FreeBSD-only diff. Can we please not go down that route with clang? It was a mistake to add a bunch of FreeBSD'isms to gcc because it made it that much harder for both the code and the compiler to be modular. We have a chance to atone for these mistakes while introducing a new compiler, can we please not make them again? Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Sun May 22 20:55:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4799E106566C; Sun, 22 May 2011 20:55:55 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 360AB8FC08; Sun, 22 May 2011 20:55:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MKtt7r090300; Sun, 22 May 2011 20:55:55 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MKtttg090297; Sun, 22 May 2011 20:55:55 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201105222055.p4MKtttg090297@svn.freebsd.org> From: Attilio Rao Date: Sun, 22 May 2011 20:55:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222198 - in head/sys: dev/cfi powerpc/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 20:55:55 -0000 Author: attilio Date: Sun May 22 20:55:54 2011 New Revision: 222198 URL: http://svn.freebsd.org/changeset/base/222198 Log: Merge r221614,221696,221737,221840 from largeSMP project branch: Rewrite atomic operations for powerpc in order to achieve the following: - Produce a type-clean implementation (in terms of functions arguments and returned values) for the primitives. - Fix errors with _long() atomics where they ended up with the wrong arguments to be accepted. - Follow the sys/type.h specifics that define the numbered types starting from standard C types. - Let _ptr() version to not auto-magically cast arguments, but leave the burden on callers, as _ptr() atomic is intended to be used relatively rarely. Fix cfi in order to support the latest point. In collabouration with: bde Tested by: andreast, nwhitehorn, jceel MFC after: 2 weeks Modified: head/sys/dev/cfi/cfi_dev.c head/sys/powerpc/include/atomic.h Modified: head/sys/dev/cfi/cfi_dev.c ============================================================================== --- head/sys/dev/cfi/cfi_dev.c Sun May 22 20:41:10 2011 (r222197) +++ head/sys/dev/cfi/cfi_dev.c Sun May 22 20:55:54 2011 (r222198) @@ -145,7 +145,8 @@ cfi_devopen(struct cdev *dev, int oflags sc = dev->si_drv1; /* We allow only 1 open. */ - if (!atomic_cmpset_acq_ptr(&sc->sc_opened, NULL, td->td_proc)) + if (!atomic_cmpset_acq_ptr((uintptr_t *)&sc->sc_opened, + (uintptr_t)NULL, (uintptr_t)td->td_proc)) return (EBUSY); return (0); } Modified: head/sys/powerpc/include/atomic.h ============================================================================== --- head/sys/powerpc/include/atomic.h Sun May 22 20:41:10 2011 (r222197) +++ head/sys/powerpc/include/atomic.h Sun May 22 20:55:54 2011 (r222198) @@ -48,13 +48,7 @@ * { *p += v; } */ -#define __ATOMIC_ADD_8(p, v, t) \ - 8-bit atomic_add not implemented - -#define __ATOMIC_ADD_16(p, v, t) \ - 16-bit atomic_add not implemented - -#define __ATOMIC_ADD_32(p, v, t) \ +#define __atomic_add_int(p, v, t) \ __asm __volatile( \ "1: lwarx %0, 0, %2\n" \ " add %0, %3, %0\n" \ @@ -63,10 +57,10 @@ : "=&r" (t), "=m" (*p) \ : "r" (p), "r" (v), "m" (*p) \ : "cc", "memory") \ - /* __ATOMIC_ADD_32 */ + /* __atomic_add_int */ #ifdef __powerpc64__ -#define __ATOMIC_ADD_64(p, v, t) \ +#define __atomic_add_long(p, v, t) \ __asm __volatile( \ "1: ldarx %0, 0, %2\n" \ " add %0, %3, %0\n" \ @@ -75,69 +69,72 @@ : "=&r" (t), "=m" (*p) \ : "r" (p), "r" (v), "m" (*p) \ : "cc", "memory") \ - /* __ATOMIC_ADD_64 */ + /* __atomic_add_long */ #else -#define __ATOMIC_ADD_64(p, v, t) \ - 64-bit atomic_add not implemented +#define __atomic_add_long(p, v, t) \ + __asm __volatile( \ + "1: lwarx %0, 0, %2\n" \ + " add %0, %3, %0\n" \ + " stwcx. %0, 0, %2\n" \ + " bne- 1b\n" \ + : "=&r" (t), "=m" (*p) \ + : "r" (p), "r" (v), "m" (*p) \ + : "cc", "memory") \ + /* __atomic_add_long */ #endif -#define _ATOMIC_ADD(width, suffix, type) \ +#define _ATOMIC_ADD(type) \ static __inline void \ - atomic_add_##suffix(volatile type *p, type v) { \ - type t; \ - __ATOMIC_ADD_##width(p, v, t); \ + atomic_add_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ + __atomic_add_##type(p, v, t); \ } \ \ static __inline void \ - atomic_add_acq_##suffix(volatile type *p, type v) { \ - type t; \ - __ATOMIC_ADD_##width(p, v, t); \ + atomic_add_acq_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ + __atomic_add_##type(p, v, t); \ __ATOMIC_BARRIER; \ } \ \ static __inline void \ - atomic_add_rel_##suffix(volatile type *p, type v) { \ - type t; \ + atomic_add_rel_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ __ATOMIC_BARRIER; \ - __ATOMIC_ADD_##width(p, v, t); \ + __atomic_add_##type(p, v, t); \ } \ /* _ATOMIC_ADD */ -#if 0 -_ATOMIC_ADD(8, 8, uint8_t) -_ATOMIC_ADD(8, char, u_char) -_ATOMIC_ADD(16, 16, uint16_t) -_ATOMIC_ADD(16, short, u_short) -#endif -_ATOMIC_ADD(32, 32, uint32_t) -_ATOMIC_ADD(32, int, u_int) -#ifdef __powerpc64__ -_ATOMIC_ADD(64, 64, uint64_t) -_ATOMIC_ADD(64, long, u_long) -_ATOMIC_ADD(64, ptr, uintptr_t) +_ATOMIC_ADD(int) +_ATOMIC_ADD(long) + +#define atomic_add_32 atomic_add_int +#define atomic_add_acq_32 atomic_add_acq_int +#define atomic_add_rel_32 atomic_add_rel_int + +#ifdef __powerpc64__ +#define atomic_add_64 atomic_add_long +#define atomic_add_acq_64 atomic_add_acq_long +#define atomic_add_rel_64 atomic_add_rel_long + +#define atomic_add_ptr atomic_add_long +#define atomic_add_acq_ptr atomic_add_acq_long +#define atomic_add_rel_ptr atomic_add_rel_long #else -_ATOMIC_ADD(32, long, u_long) -_ATOMIC_ADD(32, ptr, uintptr_t) +#define atomic_add_ptr atomic_add_int +#define atomic_add_acq_ptr atomic_add_acq_int +#define atomic_add_rel_ptr atomic_add_rel_int #endif - #undef _ATOMIC_ADD -#undef __ATOMIC_ADD_64 -#undef __ATOMIC_ADD_32 -#undef __ATOMIC_ADD_16 -#undef __ATOMIC_ADD_8 +#undef __atomic_add_long +#undef __atomic_add_int /* * atomic_clear(p, v) * { *p &= ~v; } */ -#define __ATOMIC_CLEAR_8(p, v, t) \ - 8-bit atomic_clear not implemented - -#define __ATOMIC_CLEAR_16(p, v, t) \ - 16-bit atomic_clear not implemented - -#define __ATOMIC_CLEAR_32(p, v, t) \ +#define __atomic_clear_int(p, v, t) \ __asm __volatile( \ "1: lwarx %0, 0, %2\n" \ " andc %0, %0, %3\n" \ @@ -146,10 +143,10 @@ _ATOMIC_ADD(32, ptr, uintptr_t) : "=&r" (t), "=m" (*p) \ : "r" (p), "r" (v), "m" (*p) \ : "cc", "memory") \ - /* __ATOMIC_CLEAR_32 */ + /* __atomic_clear_int */ #ifdef __powerpc64__ -#define __ATOMIC_CLEAR_64(p, v, t) \ +#define __atomic_clear_long(p, v, t) \ __asm __volatile( \ "1: ldarx %0, 0, %2\n" \ " andc %0, %0, %3\n" \ @@ -158,56 +155,66 @@ _ATOMIC_ADD(32, ptr, uintptr_t) : "=&r" (t), "=m" (*p) \ : "r" (p), "r" (v), "m" (*p) \ : "cc", "memory") \ - /* __ATOMIC_CLEAR_64 */ + /* __atomic_clear_long */ #else -#define __ATOMIC_CLEAR_64(p, v, t) \ - 64-bit atomic_clear not implemented +#define __atomic_clear_long(p, v, t) \ + __asm __volatile( \ + "1: lwarx %0, 0, %2\n" \ + " andc %0, %0, %3\n" \ + " stwcx. %0, 0, %2\n" \ + " bne- 1b\n" \ + : "=&r" (t), "=m" (*p) \ + : "r" (p), "r" (v), "m" (*p) \ + : "cc", "memory") \ + /* __atomic_clear_long */ #endif -#define _ATOMIC_CLEAR(width, suffix, type) \ +#define _ATOMIC_CLEAR(type) \ static __inline void \ - atomic_clear_##suffix(volatile type *p, type v) { \ - type t; \ - __ATOMIC_CLEAR_##width(p, v, t); \ + atomic_clear_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ + __atomic_clear_##type(p, v, t); \ } \ \ static __inline void \ - atomic_clear_acq_##suffix(volatile type *p, type v) { \ - type t; \ - __ATOMIC_CLEAR_##width(p, v, t); \ + atomic_clear_acq_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ + __atomic_clear_##type(p, v, t); \ __ATOMIC_BARRIER; \ } \ \ static __inline void \ - atomic_clear_rel_##suffix(volatile type *p, type v) { \ - type t; \ + atomic_clear_rel_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ __ATOMIC_BARRIER; \ - __ATOMIC_CLEAR_##width(p, v, t); \ + __atomic_clear_##type(p, v, t); \ } \ /* _ATOMIC_CLEAR */ -#if 0 -_ATOMIC_CLEAR(8, 8, uint8_t) -_ATOMIC_CLEAR(8, char, u_char) -_ATOMIC_CLEAR(16, 16, uint16_t) -_ATOMIC_CLEAR(16, short, u_short) -#endif -_ATOMIC_CLEAR(32, 32, uint32_t) -_ATOMIC_CLEAR(32, int, u_int) -#ifdef __powerpc64__ -_ATOMIC_CLEAR(64, 64, uint64_t) -_ATOMIC_CLEAR(64, long, u_long) -_ATOMIC_CLEAR(64, ptr, uintptr_t) + +_ATOMIC_CLEAR(int) +_ATOMIC_CLEAR(long) + +#define atomic_clear_32 atomic_clear_int +#define atomic_clear_acq_32 atomic_clear_acq_int +#define atomic_clear_rel_32 atomic_clear_rel_int + +#ifdef __powerpc64__ +#define atomic_clear_64 atomic_clear_long +#define atomic_clear_acq_64 atomic_clear_acq_long +#define atomic_clear_rel_64 atomic_clear_rel_long + +#define atomic_clear_ptr atomic_clear_long +#define atomic_clear_acq_ptr atomic_clear_acq_long +#define atomic_clear_rel_ptr atomic_clear_rel_long #else -_ATOMIC_CLEAR(32, long, u_long) -_ATOMIC_CLEAR(32, ptr, uintptr_t) +#define atomic_clear_ptr atomic_clear_int +#define atomic_clear_acq_ptr atomic_clear_acq_int +#define atomic_clear_rel_ptr atomic_clear_rel_int #endif - #undef _ATOMIC_CLEAR -#undef __ATOMIC_CLEAR_64 -#undef __ATOMIC_CLEAR_32 -#undef __ATOMIC_CLEAR_16 -#undef __ATOMIC_CLEAR_8 +#undef __atomic_clear_long +#undef __atomic_clear_int /* * atomic_cmpset(p, o, n) @@ -229,13 +236,7 @@ _ATOMIC_CLEAR(32, ptr, uintptr_t) * { *p |= v; } */ -#define __ATOMIC_SET_8(p, v, t) \ - 8-bit atomic_set not implemented - -#define __ATOMIC_SET_16(p, v, t) \ - 16-bit atomic_set not implemented - -#define __ATOMIC_SET_32(p, v, t) \ +#define __atomic_set_int(p, v, t) \ __asm __volatile( \ "1: lwarx %0, 0, %2\n" \ " or %0, %3, %0\n" \ @@ -244,10 +245,10 @@ _ATOMIC_CLEAR(32, ptr, uintptr_t) : "=&r" (t), "=m" (*p) \ : "r" (p), "r" (v), "m" (*p) \ : "cc", "memory") \ - /* __ATOMIC_SET_32 */ + /* __atomic_set_int */ #ifdef __powerpc64__ -#define __ATOMIC_SET_64(p, v, t) \ +#define __atomic_set_long(p, v, t) \ __asm __volatile( \ "1: ldarx %0, 0, %2\n" \ " or %0, %3, %0\n" \ @@ -256,69 +257,72 @@ _ATOMIC_CLEAR(32, ptr, uintptr_t) : "=&r" (t), "=m" (*p) \ : "r" (p), "r" (v), "m" (*p) \ : "cc", "memory") \ - /* __ATOMIC_SET_64 */ + /* __atomic_set_long */ #else -#define __ATOMIC_SET_64(p, v, t) \ - 64-bit atomic_set not implemented +#define __atomic_set_long(p, v, t) \ + __asm __volatile( \ + "1: lwarx %0, 0, %2\n" \ + " or %0, %3, %0\n" \ + " stwcx. %0, 0, %2\n" \ + " bne- 1b\n" \ + : "=&r" (t), "=m" (*p) \ + : "r" (p), "r" (v), "m" (*p) \ + : "cc", "memory") \ + /* __atomic_set_long */ #endif -#define _ATOMIC_SET(width, suffix, type) \ +#define _ATOMIC_SET(type) \ static __inline void \ - atomic_set_##suffix(volatile type *p, type v) { \ - type t; \ - __ATOMIC_SET_##width(p, v, t); \ + atomic_set_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ + __atomic_set_##type(p, v, t); \ } \ \ static __inline void \ - atomic_set_acq_##suffix(volatile type *p, type v) { \ - type t; \ - __ATOMIC_SET_##width(p, v, t); \ + atomic_set_acq_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ + __atomic_set_##type(p, v, t); \ __ATOMIC_BARRIER; \ } \ \ static __inline void \ - atomic_set_rel_##suffix(volatile type *p, type v) { \ - type t; \ + atomic_set_rel_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ __ATOMIC_BARRIER; \ - __ATOMIC_SET_##width(p, v, t); \ + __atomic_set_##type(p, v, t); \ } \ /* _ATOMIC_SET */ -#if 0 -_ATOMIC_SET(8, 8, uint8_t) -_ATOMIC_SET(8, char, u_char) -_ATOMIC_SET(16, 16, uint16_t) -_ATOMIC_SET(16, short, u_short) -#endif -_ATOMIC_SET(32, 32, uint32_t) -_ATOMIC_SET(32, int, u_int) -#ifdef __powerpc64__ -_ATOMIC_SET(64, 64, uint64_t) -_ATOMIC_SET(64, long, u_long) -_ATOMIC_SET(64, ptr, uintptr_t) +_ATOMIC_SET(int) +_ATOMIC_SET(long) + +#define atomic_set_32 atomic_set_int +#define atomic_set_acq_32 atomic_set_acq_int +#define atomic_set_rel_32 atomic_set_rel_int + +#ifdef __powerpc64__ +#define atomic_set_64 atomic_set_long +#define atomic_set_acq_64 atomic_set_acq_long +#define atomic_set_rel_64 atomic_set_rel_long + +#define atomic_set_ptr atomic_set_long +#define atomic_set_acq_ptr atomic_set_acq_long +#define atomic_set_rel_ptr atomic_set_rel_long #else -_ATOMIC_SET(32, long, u_long) -_ATOMIC_SET(32, ptr, uintptr_t) +#define atomic_set_ptr atomic_set_int +#define atomic_set_acq_ptr atomic_set_acq_int +#define atomic_set_rel_ptr atomic_set_rel_int #endif - #undef _ATOMIC_SET -#undef __ATOMIC_SET_64 -#undef __ATOMIC_SET_32 -#undef __ATOMIC_SET_16 -#undef __ATOMIC_SET_8 +#undef __atomic_set_long +#undef __atomic_set_int /* * atomic_subtract(p, v) * { *p -= v; } */ -#define __ATOMIC_SUBTRACT_8(p, v, t) \ - 8-bit atomic_subtract not implemented - -#define __ATOMIC_SUBTRACT_16(p, v, t) \ - 16-bit atomic_subtract not implemented - -#define __ATOMIC_SUBTRACT_32(p, v, t) \ +#define __atomic_subtract_int(p, v, t) \ __asm __volatile( \ "1: lwarx %0, 0, %2\n" \ " subf %0, %3, %0\n" \ @@ -327,10 +331,10 @@ _ATOMIC_SET(32, ptr, uintptr_t) : "=&r" (t), "=m" (*p) \ : "r" (p), "r" (v), "m" (*p) \ : "cc", "memory") \ - /* __ATOMIC_SUBTRACT_32 */ + /* __atomic_subtract_int */ #ifdef __powerpc64__ -#define __ATOMIC_SUBTRACT_64(p, v, t) \ +#define __atomic_subtract_long(p, v, t) \ __asm __volatile( \ "1: ldarx %0, 0, %2\n" \ " subf %0, %3, %0\n" \ @@ -339,56 +343,65 @@ _ATOMIC_SET(32, ptr, uintptr_t) : "=&r" (t), "=m" (*p) \ : "r" (p), "r" (v), "m" (*p) \ : "cc", "memory") \ - /* __ATOMIC_SUBTRACT_64 */ + /* __atomic_subtract_long */ #else -#define __ATOMIC_SUBTRACT_64(p, v, t) \ - 64-bit atomic_subtract not implemented +#define __atomic_subtract_long(p, v, t) \ + __asm __volatile( \ + "1: lwarx %0, 0, %2\n" \ + " subf %0, %3, %0\n" \ + " stwcx. %0, 0, %2\n" \ + " bne- 1b\n" \ + : "=&r" (t), "=m" (*p) \ + : "r" (p), "r" (v), "m" (*p) \ + : "cc", "memory") \ + /* __atomic_subtract_long */ #endif -#define _ATOMIC_SUBTRACT(width, suffix, type) \ - static __inline void \ - atomic_subtract_##suffix(volatile type *p, type v) { \ - type t; \ - __ATOMIC_SUBTRACT_##width(p, v, t); \ - } \ - \ - static __inline void \ - atomic_subtract_acq_##suffix(volatile type *p, type v) { \ - type t; \ - __ATOMIC_SUBTRACT_##width(p, v, t); \ - __ATOMIC_BARRIER; \ - } \ - \ - static __inline void \ - atomic_subtract_rel_##suffix(volatile type *p, type v) { \ - type t; \ - __ATOMIC_BARRIER; \ - __ATOMIC_SUBTRACT_##width(p, v, t); \ - } \ +#define _ATOMIC_SUBTRACT(type) \ + static __inline void \ + atomic_subtract_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ + __atomic_subtract_##type(p, v, t); \ + } \ + \ + static __inline void \ + atomic_subtract_acq_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ + __atomic_subtract_##type(p, v, t); \ + __ATOMIC_BARRIER; \ + } \ + \ + static __inline void \ + atomic_subtract_rel_##type(volatile u_##type *p, u_##type v) { \ + u_##type t; \ + __ATOMIC_BARRIER; \ + __atomic_subtract_##type(p, v, t); \ + } \ /* _ATOMIC_SUBTRACT */ -#if 0 -_ATOMIC_SUBTRACT(8, 8, uint8_t) -_ATOMIC_SUBTRACT(8, char, u_char) -_ATOMIC_SUBTRACT(16, 16, uint16_t) -_ATOMIC_SUBTRACT(16, short, u_short) -#endif -_ATOMIC_SUBTRACT(32, 32, uint32_t) -_ATOMIC_S