Date: Fri, 10 Jun 2011 03:27:25 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r222912 - in stable/8: sys/dev/mfi usr.sbin/mfiutil Message-ID: <201106100327.p5A3RPJh007670@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Fri Jun 10 03:27:25 2011 New Revision: 222912 URL: http://svn.freebsd.org/changeset/base/222912 Log: MFC r222589: There are a couple of structs in mfireg.h with members named 'class'. These cause problems when trying to include the header in a C++ project. Rename them to 'evt_class', and track the change in mfi and mfiutil. Modified: stable/8/sys/dev/mfi/mfi.c stable/8/sys/dev/mfi/mfireg.h stable/8/usr.sbin/mfiutil/mfi_evt.c 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) stable/8/usr.sbin/mfiutil/ (props changed) Modified: stable/8/sys/dev/mfi/mfi.c ============================================================================== --- stable/8/sys/dev/mfi/mfi.c Fri Jun 10 02:40:01 2011 (r222911) +++ stable/8/sys/dev/mfi/mfi.c Fri Jun 10 03:27:25 2011 (r222912) @@ -788,7 +788,7 @@ mfi_aen_setup(struct mfi_softc *sc, uint class_locale.members.reserved = 0; class_locale.members.locale = mfi_event_locale; - class_locale.members.class = mfi_event_class; + class_locale.members.evt_class = mfi_event_class; if (seq_start == 0) { error = mfi_get_log_state(sc, &log_state); @@ -1082,8 +1082,8 @@ mfi_decode_evt(struct mfi_softc *sc, str { device_printf(sc->mfi_dev, "%d (%s/0x%04x/%s) - %s\n", detail->seq, - format_timestamp(detail->time), detail->class.members.locale, - format_class(detail->class.members.class), detail->description); + format_timestamp(detail->time), detail->evt_class.members.locale, + format_class(detail->evt_class.members.evt_class), detail->description); } static int @@ -1099,16 +1099,16 @@ mfi_aen_register(struct mfi_softc *sc, i if (sc->mfi_aen_cm != NULL) { prior_aen.word = ((uint32_t *)&sc->mfi_aen_cm->cm_frame->dcmd.mbox)[1]; - if (prior_aen.members.class <= current_aen.members.class && + if (prior_aen.members.evt_class <= current_aen.members.evt_class && !((prior_aen.members.locale & current_aen.members.locale) ^current_aen.members.locale)) { return (0); } else { prior_aen.members.locale |= current_aen.members.locale; - if (prior_aen.members.class - < current_aen.members.class) - current_aen.members.class = - prior_aen.members.class; + if (prior_aen.members.evt_class + < current_aen.members.evt_class) + current_aen.members.evt_class = + prior_aen.members.evt_class; mfi_abort(sc, sc->mfi_aen_cm); } } @@ -1199,7 +1199,7 @@ mfi_parse_entries(struct mfi_softc *sc, class_locale.members.reserved = 0; class_locale.members.locale = mfi_event_locale; - class_locale.members.class = mfi_event_class; + class_locale.members.evt_class = mfi_event_class; size = sizeof(struct mfi_evt_list) + sizeof(struct mfi_evt_detail) * (MAX_EVENTS - 1); Modified: stable/8/sys/dev/mfi/mfireg.h ============================================================================== --- stable/8/sys/dev/mfi/mfireg.h Fri Jun 10 02:40:01 2011 (r222911) +++ stable/8/sys/dev/mfi/mfireg.h Fri Jun 10 03:27:25 2011 (r222912) @@ -719,7 +719,7 @@ union mfi_evt { struct { uint16_t locale; uint8_t reserved; - int8_t class; + int8_t evt_class; } members; uint32_t word; } __packed; @@ -755,7 +755,7 @@ struct mfi_evt_detail { uint32_t seq; uint32_t time; uint32_t code; - union mfi_evt class; + union mfi_evt evt_class; uint8_t arg_type; uint8_t reserved1[15]; Modified: stable/8/usr.sbin/mfiutil/mfi_evt.c ============================================================================== --- stable/8/usr.sbin/mfiutil/mfi_evt.c Fri Jun 10 02:40:01 2011 (r222911) +++ stable/8/usr.sbin/mfiutil/mfi_evt.c Fri Jun 10 03:27:25 2011 (r222912) @@ -362,8 +362,8 @@ mfi_decode_evt(int fd, struct mfi_evt_de { printf("%5d (%s/%s/%s) - ", detail->seq, format_timestamp(detail->time), - format_locale(detail->class.members.locale), - format_class(detail->class.members.class)); + format_locale(detail->evt_class.members.locale), + format_class(detail->evt_class.members.evt_class)); switch (detail->arg_type) { case MR_EVT_ARGS_NONE: break; @@ -557,7 +557,7 @@ show_events(int ac, char **av) num_events = 15; filter.members.reserved = 0; filter.members.locale = MFI_EVT_LOCALE_ALL; - filter.members.class = MFI_EVT_CLASS_WARNING; + filter.members.evt_class = MFI_EVT_CLASS_WARNING; start = info.boot_seq_num; stop = info.newest_seq_num; verbose = 0; @@ -567,7 +567,7 @@ show_events(int ac, char **av) while ((ch = getopt(ac, av, "c:l:n:v")) != -1) { switch (ch) { case 'c': - if (parse_class(optarg, &filter.members.class) < 0) { + if (parse_class(optarg, &filter.members.evt_class) < 0) { error = errno; warn("Error parsing event class"); return (error);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106100327.p5A3RPJh007670>