git: c6ad7dcd9c44 - main - mfiutil: Fix incorrect accesses of an union member in 'struct mfi_evt_detail'
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 20 Sep 2024 22:40:20 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=c6ad7dcd9c44a49078841e9ec42bf8621ae312c7
commit c6ad7dcd9c44a49078841e9ec42bf8621ae312c7
Author: WHR <whr@rivoreo.one>
AuthorDate: 2024-09-03 04:44:48 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-09-20 22:22:44 +0000
mfiutil: Fix incorrect accesses of an union member in 'struct mfi_evt_detail'
PR: 281156
Reviewed by: imp, delphij
Pull Request: https://github.com/freebsd/freebsd-src/pull/1402
---
usr.sbin/mfiutil/mfi_evt.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/usr.sbin/mfiutil/mfi_evt.c b/usr.sbin/mfiutil/mfi_evt.c
index 9f6c0c2246ca..d4eb48d9dcb4 100644
--- a/usr.sbin/mfiutil/mfi_evt.c
+++ b/usr.sbin/mfiutil/mfi_evt.c
@@ -395,7 +395,7 @@ mfi_decode_evt(int fd, struct mfi_evt_detail *detail, int verbose)
printf(": ");
break;
case MR_EVT_ARGS_LD_LBA:
- printf("VOL %s", volume_name(fd, &detail->args.ld_count.ld));
+ printf("VOL %s", volume_name(fd, &detail->args.ld_lba.ld));
if (verbose) {
printf(" lba %lld",
(long long)detail->args.ld_lba.lba);
@@ -403,7 +403,7 @@ mfi_decode_evt(int fd, struct mfi_evt_detail *detail, int verbose)
printf(": ");
break;
case MR_EVT_ARGS_LD_OWNER:
- printf("VOL %s", volume_name(fd, &detail->args.ld_count.ld));
+ printf("VOL %s", volume_name(fd, &detail->args.ld_owner.ld));
if (verbose) {
printf(" owner changed: prior %d, new %d",
detail->args.ld_owner.pre_owner,
@@ -412,7 +412,7 @@ mfi_decode_evt(int fd, struct mfi_evt_detail *detail, int verbose)
printf(": ");
break;
case MR_EVT_ARGS_LD_LBA_PD_LBA:
- printf("VOL %s", volume_name(fd, &detail->args.ld_count.ld));
+ printf("VOL %s", volume_name(fd, &detail->args.ld_lba_pd_lba.ld));
if (verbose) {
printf(" lba %lld, physical drive PD %s lba %lld",
(long long)detail->args.ld_lba_pd_lba.ld_lba,
@@ -431,7 +431,7 @@ mfi_decode_evt(int fd, struct mfi_evt_detail *detail, int verbose)
printf(": ");
break;
case MR_EVT_ARGS_LD_STATE:
- printf("VOL %s", volume_name(fd, &detail->args.ld_prog.ld));
+ printf("VOL %s", volume_name(fd, &detail->args.ld_state.ld));
if (verbose) {
printf(" state prior %s new %s",
mfi_ldstate(detail->args.ld_state.prev_state),
@@ -486,7 +486,7 @@ mfi_decode_evt(int fd, struct mfi_evt_detail *detail, int verbose)
case MR_EVT_ARGS_PD_STATE:
if (verbose) {
printf("PD %s state prior %s new %s: ",
- pdrive_location(&detail->args.pd_prog.pd),
+ pdrive_location(&detail->args.pd_state.pd),
mfi_pdstate(detail->args.pd_state.prev_state),
mfi_pdstate(detail->args.pd_state.new_state));
}