NetBSD Problem Report #47909

From dholland@netbsd.org  Sat Jun  8 21:22:24 2013
Return-Path: <dholland@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 6C4C071974
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  8 Jun 2013 21:22:24 +0000 (UTC)
Message-Id: <20130608212223.EC75F14A163@mail.netbsd.org>
Date: Sat,  8 Jun 2013 21:22:23 +0000 (UTC)
From: dholland@NetBSD.org
Reply-To: dholland@NetBSD.org
To: gnats-bugs@gnats.NetBSD.org
Subject: ufs symbol pollution
X-Send-Pr-Version: 3.95

>Number:         47909
>Category:       kern
>Synopsis:       ufs symbol pollution
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    dholland
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 08 21:25:00 +0000 2013
>Last-Modified:  Sun Jun 09 18:30:01 +0000 2013
>Originator:     David A. Holland
>Release:        current of 20130607
>Organization:
>Environment:
n/a
>Description:

The ufs headers expose a lot of symbols that do not begin with ufs_ or
UFS_; this is unfriendly to other file systems, because there are a
number of tools that support multiple file system types and want to be
able to include headers from all of them in the same translation unit.

I've already fixed a number of these; here are some more that have
come to light: 

(1)
DIRBLKSIZ
DIRECTSIZ
DIRSIZ
OLDDIRFMT
NEWDIRFMT

(2)
IFTODT
DTTOIF
IFMT, IFIFO, IFCHR, etc.
DT_UNKNOWN, DT_FIFO, DT_CHR, etc.

The DT_ ones are particularly problematic as they duplicate the
FS-independent symbols from <dirent.h>.

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->dholland
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Sat, 08 Jun 2013 22:52:43 +0000
Responsible-Changed-Why:
This is basically a reminder for me; but if it's stored in gnats it'll
still hopefully get done eventually even if I get hit by a bus.


From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/47909 CVS commit: src
Date: Sun, 9 Jun 2013 17:57:09 +0000

 Module Name:	src
 Committed By:	dholland
 Date:		Sun Jun  9 17:57:09 UTC 2013

 Modified Files:
 	src/sbin/fsck_ext2fs: dir.c
 	src/sbin/fsck_ffs: dir.c pass2.c setup.c
 	src/sbin/fsdb: fsdb.c
 	src/sbin/restore: dirs.c
 	src/sys/lib/libsa: ufs.c
 	src/sys/ufs/ffs: ffs_vfsops.c
 	src/sys/ufs/ufs: dir.h dirhash.h ufs_dirhash.c ufs_extattr.c
 	    ufs_lookup.c ufs_rename.c ufs_vnops.c
 	src/usr.sbin/makefs: ffs.c

 Log Message:
 Stick UFS_ in front of these symbols:
    DIRBLKSIZ
    DIRECTSIZ
    DIRSIZ
    OLDDIRFMT
    NEWDIRFMT

 Part of PR 47909.


 To generate a diff of this commit:
 cvs rdiff -u -r1.26 -r1.27 src/sbin/fsck_ext2fs/dir.c
 cvs rdiff -u -r1.54 -r1.55 src/sbin/fsck_ffs/dir.c
 cvs rdiff -u -r1.49 -r1.50 src/sbin/fsck_ffs/pass2.c
 cvs rdiff -u -r1.96 -r1.97 src/sbin/fsck_ffs/setup.c
 cvs rdiff -u -r1.45 -r1.46 src/sbin/fsdb/fsdb.c
 cvs rdiff -u -r1.49 -r1.50 src/sbin/restore/dirs.c
 cvs rdiff -u -r1.59 -r1.60 src/sys/lib/libsa/ufs.c
 cvs rdiff -u -r1.282 -r1.283 src/sys/ufs/ffs/ffs_vfsops.c
 cvs rdiff -u -r1.22 -r1.23 src/sys/ufs/ufs/dir.h
 cvs rdiff -u -r1.6 -r1.7 src/sys/ufs/ufs/dirhash.h \
     src/sys/ufs/ufs/ufs_rename.c
 cvs rdiff -u -r1.34 -r1.35 src/sys/ufs/ufs/ufs_dirhash.c
 cvs rdiff -u -r1.41 -r1.42 src/sys/ufs/ufs/ufs_extattr.c
 cvs rdiff -u -r1.122 -r1.123 src/sys/ufs/ufs/ufs_lookup.c
 cvs rdiff -u -r1.213 -r1.214 src/sys/ufs/ufs/ufs_vnops.c
 cvs rdiff -u -r1.60 -r1.61 src/usr.sbin/makefs/ffs.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/47909 CVS commit: src/sys/kern
Date: Sun, 9 Jun 2013 18:29:26 +0000

 Module Name:	src
 Committed By:	dholland
 Date:		Sun Jun  9 18:29:26 UTC 2013

 Modified Files:
 	src/sys/kern: vfs_getcwd.c

 Log Message:
 Stick UFS_ in front of these symbols:
    DIRBLKSIZ
    DIRECTSIZ
    DIRSIZ
    OLDDIRFMT
    NEWDIRFMT

 Part of PR 47909.

 (two stragglers in this commit; oops)


 To generate a diff of this commit:
 cvs rdiff -u -r1.48 -r1.49 src/sys/kern/vfs_getcwd.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/47909 CVS commit: src/sbin/newfs
Date: Sun, 9 Jun 2013 18:29:41 +0000

 Module Name:	src
 Committed By:	dholland
 Date:		Sun Jun  9 18:29:41 UTC 2013

 Modified Files:
 	src/sbin/newfs: mkfs.c

 Log Message:
 Stick UFS_ in front of these symbols:
    DIRBLKSIZ
    DIRECTSIZ
    DIRSIZ
    OLDDIRFMT
    NEWDIRFMT

 Part of PR 47909.

 (two stragglers in this commit; oops)


 To generate a diff of this commit:
 cvs rdiff -u -r1.114 -r1.115 src/sbin/newfs/mkfs.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.