mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
libefi: remove efi_type()
All it is right now is some #if 0ed Solaris code that returns ENOSYS, and is only applicable for the Solaris blockdev layer. In the Illumos gate, there's a single user: rmformat(1); I recommend a read of the manual as a blast from the past, but, well Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Issue #12844 Closes #12969
This commit is contained in:
@@ -1541,34 +1541,6 @@ efi_free(struct dk_gpt *ptr)
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Input: File descriptor
|
||||
* Output: 1 if disk has an EFI label, or > 2TB with no VTOC or legacy MBR.
|
||||
* Otherwise 0.
|
||||
*/
|
||||
int
|
||||
efi_type(int fd)
|
||||
{
|
||||
#if 0
|
||||
struct vtoc vtoc;
|
||||
struct extvtoc extvtoc;
|
||||
|
||||
if (ioctl(fd, DKIOCGEXTVTOC, &extvtoc) == -1) {
|
||||
if (errno == ENOTSUP)
|
||||
return (1);
|
||||
else if (errno == ENOTTY) {
|
||||
if (ioctl(fd, DKIOCGVTOC, &vtoc) == -1)
|
||||
if (errno == ENOTSUP)
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
return (0);
|
||||
#else
|
||||
(void) fd;
|
||||
return (ENOSYS);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
efi_err_check(struct dk_gpt *vtoc)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user