git: d428dcc996b5 - stable/13 - stand/mips64: Make beri loader compile
Date: Wed, 25 Jan 2023 15:23:05 UTC
The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d428dcc996b5ec26166bbd90ef0fc6996838c337 commit d428dcc996b5ec26166bbd90ef0fc6996838c337 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2023-01-25 15:14:45 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2023-01-25 15:21:04 +0000 stand/mips64: Make beri loader compile The devdesc reorgs in main were done after mips was deleted. Make the minimal changes to beri's devicename.c needed after that. I have no ability to test this, however, so it builds with similar warnings to before all my MFC changes. This is a direct commit to stable/13 --- stand/mips/beri/loader/devicename.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/stand/mips/beri/loader/devicename.c b/stand/mips/beri/loader/devicename.c index b1f0afd5bc1f..eb4c14e8a2af 100644 --- a/stand/mips/beri/loader/devicename.c +++ b/stand/mips/beri/loader/devicename.c @@ -85,7 +85,7 @@ static int beri_arch_parsedev(struct disk_devdesc **dev, const char *devspec, const char **path) { - struct disk_devdesc *idev; + struct devdesc *idev; struct devsw *dv; int i, unit, err; char *cp; @@ -113,7 +113,8 @@ beri_arch_parsedev(struct disk_devdesc **dev, const char *devspec, break; case DEVT_DISK: - err = disk_parsedev(idev, np, path); + free(idev); + err = disk_parsedev(&idev, np, path); if (err != 0) goto fail; break; @@ -139,7 +140,7 @@ beri_arch_parsedev(struct disk_devdesc **dev, const char *devspec, goto fail; } - idev->dd.d_unit = unit; + idev->d_unit = unit; if (path != NULL) *path = (*cp == 0) ? cp : cp + 1; break; @@ -148,11 +149,11 @@ beri_arch_parsedev(struct disk_devdesc **dev, const char *devspec, err = EINVAL; goto fail; } - idev->dd.d_dev = dv; + idev->d_dev = dv; if (dev == NULL) { free(idev); } else { - *dev = idev; + *dev = (struct disk_devdesc *)idev; } return(0);