X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=lib%2Flibefi%2Frdwr_efi.c;h=f4cf41712a69a456da23eb2b00659a7eeb6695dd;hb=ee5fd0bb80d68ef095f831784cbb17181b2ba898;hp=474f78a38bc0949d10121b364c77af6aa3407233;hpb=cee43a7477501669920445f29990443679142336;p=zfs.git diff --git a/lib/libefi/rdwr_efi.c b/lib/libefi/rdwr_efi.c index 474f78a..f4cf417 100644 --- a/lib/libefi/rdwr_efi.c +++ b/lib/libefi/rdwr_efi.c @@ -87,7 +87,7 @@ struct dk_map2 default_vtoc_map[NDKMAP] = { #if defined(_SUNOS_VTOC_16) -#if defined(i386) || defined(__amd64) || defined(__arm) +#if defined(i386) || defined(__amd64) || defined(__arm) || defined(__powerpc) { V_BOOT, V_UNMNT }, /* i - 8 */ { V_ALTSCTR, 0 }, /* j - 9 */ @@ -497,10 +497,9 @@ efi_ioctl(int fd, int cmd, dk_efi_t *dk_ioc) return (error); } -#if defined(__linux__) -static int -efi_rescan(int fd) +int efi_rescan(int fd) { +#if defined(__linux__) int retry = 5; int error; @@ -512,10 +511,10 @@ efi_rescan(int fd) return (-1); } } +#endif return (0); } -#endif static int check_label(int fd, dk_efi_t *dk_ioc) @@ -1304,12 +1303,6 @@ efi_write(int fd, struct dk_gpt *vtoc) (void) write_pmbr(fd, vtoc); free(dk_ioc.dki_data); -#if defined(__linux__) - rval = efi_rescan(fd); - if (rval) - return (VT_ERROR); -#endif - return (0); }