Bug 169657 - [dtrace] name clash between dtrace and geom.h
Summary: [dtrace] name clash between dtrace and geom.h
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Mark Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-05 10:50 UTC by W.L. Tai
Modified: 2014-12-26 22:54 UTC (History)
0 users

See Also:
bugmeister: mfc-stable10?
bugmeister: mfc-stable9?
bugmeister: mfc-stable8?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description W.L. Tai 2012-07-05 10:50:07 UTC
provider is a reserved word in dtrace but it is also the name of a member of 

struct g_geom {
        char                    *name;
        struct g_class          *class;
        LIST_ENTRY(g_geom)      geom;
        LIST_HEAD(,g_consumer)  consumer;
        LIST_HEAD(,g_provider)  provider;
        TAILQ_ENTRY(g_geom)     geoms;  /* XXX: better name */
        int                     rank;
        g_start_t               *start;
        g_spoiled_t             *spoiled;
        g_attrchanged_t         *attrchanged;
        g_dumpconf_t            *dumpconf;
        g_access_t              *access;
        g_orphan_t              *orphan;
        g_ioctl_t               *ioctl;
        void                    *spare0;
        void                    *spare1;
        void                    *softc;
        unsigned                flags;
#define G_GEOM_WITHER           1
#define G_GEOM_VOLATILE_BIO     2
};

struct g_consumer and struct g_provider.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2012-07-10 03:33:40 UTC
Responsible Changed
From-To: freebsd-bugs->gnn

Over to willing volunteer.
Comment 2 George V. Neville-Neil freebsd_committer freebsd_triage 2014-04-21 18:14:11 UTC
Responsible Changed
From-To: gnn->markj

Hand over to the person doing most of the DTrace work.
Comment 3 Mark Johnston freebsd_committer freebsd_triage 2014-10-04 19:54:04 UTC
A proposed fix is here: https://lists.freebsd.org/pipermail/freebsd-dtrace/2014-October/000279.html
Comment 4 commit-hook freebsd_committer freebsd_triage 2014-10-06 21:52:52 UTC
A commit references this bug:

Author: markj
Date: Mon Oct  6 21:52:41 UTC 2014
New revision: 272671
URL: https://svnweb.freebsd.org/changeset/base/272671

Log:
  Treat D keywords as identifiers in certain postfix expressions. This allows
  one to, for example, access the "provider" field of a struct g_consumer,
  even though "provider" is a D keyword.

  PR:		169657
  MFC after:	2 months
  Discussed with:	Bryan Cantrill
  Sponsored by:	EMC / Isilon Storage Division

Changes:
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_grammar.y
Comment 5 commit-hook freebsd_committer freebsd_triage 2014-12-26 22:53:46 UTC
A commit references this bug:

Author: markj
Date: Fri Dec 26 22:52:44 UTC 2014
New revision: 276266
URL: https://svnweb.freebsd.org/changeset/base/276266

Log:
  MFC r272671:
  Treat D keywords as identifiers in certain postfix expressions. This allows
  one to, for example, access the "provider" field of a struct g_consumer,
  even though "provider" is a D keyword.

  PR:	169657

Changes:
_U  stable/9/cddl/contrib/opensolaris/
_U  stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/
  stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_grammar.y
Comment 6 commit-hook freebsd_committer freebsd_triage 2014-12-26 22:53:47 UTC
A commit references this bug:

Author: markj
Date: Fri Dec 26 22:52:46 UTC 2014
New revision: 276267
URL: https://svnweb.freebsd.org/changeset/base/276267

Log:
  MFC r272671:
  Treat D keywords as identifiers in certain postfix expressions. This allows
  one to, for example, access the "provider" field of a struct g_consumer,
  even though "provider" is a D keyword.

  PR:	169657

Changes:
_U  stable/10/
  stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_grammar.y