You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branches 'x86-reboot-for-linus' and 'x86-setup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-reboot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: Reorder reboot method preferences * 'x86-setup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, setup: Fix EDD3.0 data verification.
This commit is contained in:
+11
-11
@@ -531,8 +531,8 @@ static int
|
||||
edd_has_edd30(struct edd_device *edev)
|
||||
{
|
||||
struct edd_info *info;
|
||||
int i, nonzero_path = 0;
|
||||
char c;
|
||||
int i;
|
||||
u8 csum = 0;
|
||||
|
||||
if (!edev)
|
||||
return 0;
|
||||
@@ -544,16 +544,16 @@ edd_has_edd30(struct edd_device *edev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = 30; i <= 73; i++) {
|
||||
c = *(((uint8_t *) info) + i + 4);
|
||||
if (c) {
|
||||
nonzero_path++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!nonzero_path) {
|
||||
|
||||
/* We support only T13 spec */
|
||||
if (info->params.device_path_info_length != 44)
|
||||
return 0;
|
||||
|
||||
for (i = 30; i < info->params.device_path_info_length + 30; i++)
|
||||
csum += *(((u8 *)&info->params) + i);
|
||||
|
||||
if (csum)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user