mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-29 10:39:22 +00:00
Get sector size from disk label for NetBSD.
This commit is contained in:
1 parent
2221ab6c62
commit
1a7d7db97f
2 files changed
+9
-1
No files matched your search
@@ -1,3 +1,8 @@
|
||||
2011-09-17 Grégoire Sutre <gregoire.sutre@gmail.com>
|
||||
|
||||
* grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors) [__NetBSD__]:
|
||||
Get sector size from disk label.
|
||||
|
||||
2011-09-05 Colin Watson <cjwatson@ubuntu.com>
|
||||
|
||||
* util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Return 1 for
|
||||
|
||||
@@ -265,10 +265,13 @@ grub_util_get_fd_sectors (int fd, unsigned *log_secsize)
|
||||
|
||||
# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
if (ioctl (fd, DIOCGSECTORSIZE, §or_size))
|
||||
goto fail;
|
||||
# elif defined(__NetBSD__)
|
||||
sector_size = label.d_secsize;
|
||||
# else
|
||||
if (ioctl (fd, BLKSSZGET, §or_size))
|
||||
# endif
|
||||
goto fail;
|
||||
# endif
|
||||
|
||||
if (sector_size & (sector_size - 1) || !sector_size)
|
||||
goto fail;
|
||||
|
||||
Reference in new issue
Block a user