There's a number of burn bridges marked code in the tree now:

Chopping block before 8.0

Pre IGMPV3 message names

BMS says these can go.

netinet/igmp_var.h:

#ifndef BURN_BRIDGES
/*
 * Pre-IGMPV3 igmpstat structure.
 */
struct oigmpstat {
        u_int igps_rcv_total;           /* total IGMP messages received */
        u_int igps_rcv_tooshort;        /* received with too few bytes */
        u_int igps_rcv_badsum;          /* received with bad checksum */
        u_int igps_rcv_queries;         /* received membership queries */
        u_int igps_rcv_badqueries;      /* received invalid queries */
        u_int igps_rcv_reports;         /* received membership reports */
        u_int igps_rcv_badreports;      /* received invalid reports */
        u_int igps_rcv_ourreports;      /* received reports for our groups */
        u_int igps_snd_reports;         /* sent membership reports */
        u_int igps_rcv_toolong;         /* received with too many bytes */
};
#endif

Chopping Block after 8.0

in_addmulti and in_delmulti

BMS says keep this, but discourage their use. There's a number of textbooks that still reference these things.

netinet/in_mcast.c:

/*#ifndef BURN_BRIDGES*/
/*
 * Join an IPv4 multicast group in (*,G) exclusive mode.
 * The group must be a 224.0.0.0/24 link-scope group.
 * This KPI is for legacy kernel consumers only.
 */
struct in_multi *
in_addmulti(struct in_addr *ap, struct ifnet *ifp)
{
        struct in_multi *pinm;
        int error;

        KASSERT(IN_LOCAL_GROUP(ntohl(ap->s_addr)),
            ("%s: %s not in 224.0.0.0/24", __func__, inet_ntoa(*ap)));

        error = in_joingroup(ifp, ap, NULL, &pinm);
        if (error != 0)
                pinm = NULL;

        return (pinm);
}

/*
 * Leave an IPv4 multicast group, assumed to be in exclusive (*,G) mode.
 * This KPI is for legacy kernel consumers only.
 */
void
in_delmulti(struct in_multi *inm)
{

        (void)in_leavegroup(inm, NULL);
}
/*#endif*/

False Positives

Items in this section are currently marked BURN_BRIDGES, but likely need to have some other way to force their removal from the compiled code (kernel options, etc).

vfs.generic sysctl

Alfred doesn't think that this is a BURN_BRIDGES item. Other people think it could have been deleted a long time ago. Need someone clueful about its history and current use to see if this will cause upgrade problems for users.

This was marked as burning bridges: Revision 1.490: Sun Apr 11 21:09:22 2004 UTC (5 years ago) by mux

Put deprecated sysctl code inside BURN_BRIDGES.

So I think we can just kill it.

DougWhite: The vfs.generic sysctl API was used by getvfsbyname(3) prior to RELENG_5. "struct ovfsconf" was used by getvfsent(3) which was removed prior to 5.3-RELEASE. Removing these interfaces would break lsvfs(8) from versions prior to these changes, or any user tools that used these functions to enumerate loaded filesystem modules. Because getvfsent(3) exposed the internal kernel structures (except in 5.0-5.2), I'm not sure it would work even if you pulled lsvfs from RELENG_4.

WarnerLosh: I revise my suggestion. These should just be COMPAT_FREEBSD_xx maybe?

kern/vfs_subr.c

#ifndef BURN_BRIDGES
static int      sysctl_ovfs_conf(SYSCTL_HANDLER_ARGS);

static int
vfs_sysctl(SYSCTL_HANDLER_ARGS)
{
        int *name = (int *)arg1 - 1;    /* XXX */
        u_int namelen = arg2 + 1;       /* XXX */
        struct vfsconf *vfsp;
        struct xvfsconf xvfsp;

        printf("WARNING: userland calling deprecated sysctl, "
            "please rebuild world\n");

#if 1 || defined(COMPAT_PRELITE2)
        /* Resolve ambiguity between VFS_VFSCONF and VFS_GENERIC. */
        if (namelen == 1)
                return (sysctl_ovfs_conf(oidp, arg1, arg2, req));
#endif

        switch (name[1]) {
        case VFS_MAXTYPENUM:
                if (namelen != 2)
                        return (ENOTDIR);
                return (SYSCTL_OUT(req, &maxvfsconf, sizeof(int)));
        case VFS_CONF:
                if (namelen != 3)
                        return (ENOTDIR);       /* overloaded */
                TAILQ_FOREACH(vfsp, &vfsconf, vfc_list)
                        if (vfsp->vfc_typenum == name[2])
                                break;
                if (vfsp == NULL)
                        return (EOPNOTSUPP);
                bzero(&xvfsp, sizeof(xvfsp));
                vfsconf2x(vfsp, &xvfsp);
                return (SYSCTL_OUT(req, &xvfsp, sizeof(xvfsp)));
        }
        return (EOPNOTSUPP);
}

static SYSCTL_NODE(_vfs, VFS_GENERIC, generic, CTLFLAG_RD | CTLFLAG_SKIP,
        vfs_sysctl, "Generic filesystem");

#if 1 || defined(COMPAT_PRELITE2)

static int
sysctl_ovfs_conf(SYSCTL_HANDLER_ARGS)
{
        int error;
        struct vfsconf *vfsp;
        struct ovfsconf ovfs;

        TAILQ_FOREACH(vfsp, &vfsconf, vfc_list) {
                bzero(&ovfs, sizeof(ovfs));
                ovfs.vfc_vfsops = vfsp->vfc_vfsops;     /* XXX used as flag */
                strcpy(ovfs.vfc_name, vfsp->vfc_name);
                ovfs.vfc_index = vfsp->vfc_typenum;
                ovfs.vfc_refcount = vfsp->vfc_refcount;
                ovfs.vfc_flags = vfsp->vfc_flags;
                error = SYSCTL_OUT(req, &ovfs, sizeof ovfs);
                if (error)
                        return error;
        }
        return 0;
}

#endif /* 1 || COMPAT_PRELITE2 */
#endif /* !BURN_BRIDGES */

./sys/mount.h:

#ifndef BURN_BRIDGES
struct ovfsconf {
        void    *vfc_vfsops;
        char    vfc_name[32];
        int     vfc_index;
        int     vfc_refcount;
        int     vfc_flags;
};
#endif

BurnBridges8 (last edited 2009-06-10 18:18:55 by WarnerLosh)