ok drahn@
On Mon, May 28, 2018 at 03:57:58PM +0200, Mark Kettenis wrote:
> This has a hand-rolled readdisksector.  Replace it with a function
> call like we do on other architectures.  Also remove an include that
> isn't needed and isn't present on other architectures.
> 
> ok?
> 
> 
> Index: arch/arm64/arm64/disksubr.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/arm64/arm64/disksubr.c,v
> retrieving revision 1.2
> diff -u -p -r1.2 disksubr.c
> --- arch/arm64/arm64/disksubr.c       28 Feb 2017 10:49:37 -0000      1.2
> +++ arch/arm64/arm64/disksubr.c       28 May 2018 13:55:31 -0000
> @@ -32,7 +32,6 @@
>   */
>  
>  #include <sys/param.h>
> -#include <sys/systm.h>
>  #include <sys/buf.h>
>  #include <sys/disklabel.h>
>  #include <sys/disk.h>
> @@ -110,15 +109,11 @@ writedisklabel(dev_t dev, void (*strat)(
>               goto done;
>  
>       /* Read it in, slap the new label in, and write it back out */
> -     bp->b_blkno = DL_BLKTOSEC(lp, partoff + DOS_LABELSECTOR) *
> -         DL_BLKSPERSEC(lp);
> -     offset = DL_BLKOFFSET(lp, partoff + DOS_LABELSECTOR);
> -     bp->b_bcount = lp->d_secsize;
> -     CLR(bp->b_flags, B_READ | B_WRITE | B_DONE);
> -     SET(bp->b_flags, B_BUSY | B_READ | B_RAW);
> -     (*strat)(bp);
> -     if ((error = biowait(bp)) != 0)
> +     error = readdisksector(bp, strat, lp, DL_BLKTOSEC(lp, partoff +
> +         DOS_LABELSECTOR));
> +     if (error)
>               goto done;
> +     offset = DL_BLKOFFSET(lp, partoff + DOS_LABELSECTOR);
>  
>       dlp = (struct disklabel *)(bp->b_data + offset);
>       *dlp = *lp;
> 
Dale Rahn                               dr...@dalerahn.com

Reply via email to