| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: biosdisk.c,v 1.55 2021/05/30 05:59:23 mlelstv Exp $ */ | | 1 | /* $NetBSD: biosdisk.c,v 1.56 2021/12/28 00:34:30 simonb Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1996, 1998 | | 4 | * Copyright (c) 1996, 1998 |
5 | * Matthias Drochner. All rights reserved. | | 5 | * Matthias Drochner. All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -1035,27 +1035,27 @@ biosdisk_findpartition(int biosdev, dadd | | | @@ -1035,27 +1035,27 @@ biosdisk_findpartition(int biosdev, dadd |
1035 | struct biosdisk *d; | | 1035 | struct biosdisk *d; |
1036 | int biosboot_sector_part = -1; | | 1036 | int biosboot_sector_part = -1; |
1037 | int bootable_fs_part = -1; | | 1037 | int bootable_fs_part = -1; |
1038 | int boot_part = 0; | | 1038 | int boot_part = 0; |
1039 | #ifndef NO_GPT | | 1039 | #ifndef NO_GPT |
1040 | int gpt_bootme_part = -1; | | 1040 | int gpt_bootme_part = -1; |
1041 | static char namebuf[MAXDEVNAME + 1]; | | 1041 | static char namebuf[MAXDEVNAME + 1]; |
1042 | #endif | | 1042 | #endif |
1043 | | | 1043 | |
1044 | #ifdef DISK_DEBUG | | 1044 | #ifdef DISK_DEBUG |
1045 | printf("looking for partition device %x, sector %"PRId64"\n", biosdev, sector); | | 1045 | printf("looking for partition device %x, sector %"PRId64"\n", biosdev, sector); |
1046 | #endif | | 1046 | #endif |
1047 | | | 1047 | |
1048 | /* default ot first partition */ | | 1048 | /* default to first partition */ |
1049 | *partition = 0; | | 1049 | *partition = 0; |
1050 | *part_name = NULL; | | 1050 | *part_name = NULL; |
1051 | | | 1051 | |
1052 | /* Look for netbsd partition that is the dos boot one */ | | 1052 | /* Look for netbsd partition that is the dos boot one */ |
1053 | d = alloc_biosdisk(biosdev); | | 1053 | d = alloc_biosdisk(biosdev); |
1054 | if (d == NULL) | | 1054 | if (d == NULL) |
1055 | return -1; | | 1055 | return -1; |
1056 | | | 1056 | |
1057 | if (read_partitions(d, 0, 0) == 0) { | | 1057 | if (read_partitions(d, 0, 0) == 0) { |
1058 | for (i = 0; i < BIOSDISKNPART; i++) { | | 1058 | for (i = 0; i < BIOSDISKNPART; i++) { |
1059 | if (d->part[i].fstype == FS_UNUSED) | | 1059 | if (d->part[i].fstype == FS_UNUSED) |
1060 | continue; | | 1060 | continue; |
1061 | | | 1061 | |