Revert src/sys/kern/subr_disk_mbr.c r.1.52

Addressed in a better way in r. 1.53.
This commit is contained in:
kamil 2019-11-07 18:35:41 +00:00
parent 077b1ebea2
commit 185882ca80
1 changed files with 4 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: subr_disk_mbr.c,v 1.53 2019/11/07 18:30:27 kamil Exp $ */
/* $NetBSD: subr_disk_mbr.c,v 1.54 2019/11/07 18:35:41 kamil Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: subr_disk_mbr.c,v 1.53 2019/11/07 18:30:27 kamil Exp $");
__KERNEL_RCSID(0, "$NetBSD: subr_disk_mbr.c,v 1.54 2019/11/07 18:35:41 kamil Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -571,11 +571,8 @@ look_netbsd_part(mbr_args_t *a, mbr_partition_t *dp, int slot, uint ext_base)
static bool
check_label_magic(const struct disklabel *dlp, uint32_t diskmagic)
{
return memcmp((const char *)dlp + offsetof(struct disklabel, d_magic),
&diskmagic, sizeof(diskmagic)) == 0 &&
memcmp((const char *)dlp + offsetof(struct disklabel, d_magic2),
&diskmagic, sizeof(diskmagic)) == 0;
return memcmp(&dlp->d_magic, &diskmagic, sizeof(diskmagic)) == 0 &&
memcmp(&dlp->d_magic2, &diskmagic, sizeof(diskmagic)) == 0;
}
#ifdef DISKLABEL_EI