diff options
Diffstat (limited to 'meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-fix-disk-minor-number-discovery.patch')
-rw-r--r-- | meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-fix-disk-minor-number-discovery.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-fix-disk-minor-number-discovery.patch b/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-fix-disk-minor-number-discovery.patch new file mode 100644 index 0000000..e9b5358 --- /dev/null +++ b/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-fix-disk-minor-number-discovery.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From f9f4ee75ad745637a47bf17ed968101b1ffbcc1d Mon Sep 17 00:00:00 2001 | ||
2 | From: Matt Domsch <Matt_Domsch@dell.com> | ||
3 | Date: Thu, 23 Jul 2009 14:20:19 -0500 | ||
4 | Subject: [PATCH 4/5] fix disk minor number discovery | ||
5 | |||
6 | Raymund Will noted disk_info_from_fd() incorrectly used logical && | ||
7 | instead of bitwise & when obtaining the minor number. | ||
8 | |||
9 | Reported in https://bugzilla.novell.com/show_bug.cgi?id=524529#c1 | ||
10 | --- | ||
11 | src/lib/disk.c | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/src/lib/disk.c b/src/lib/disk.c | ||
15 | index ebfe619..8ad590b 100644 | ||
16 | --- a/src/lib/disk.c | ||
17 | +++ b/src/lib/disk.c | ||
18 | @@ -55,7 +55,7 @@ disk_info_from_fd(int fd, | ||
19 | return 1; | ||
20 | } | ||
21 | major = buf.st_dev >> 8; | ||
22 | - minor = buf.st_dev && 0xFF; | ||
23 | + minor = buf.st_dev & 0xFF; | ||
24 | |||
25 | /* IDE disks can have up to 64 partitions, or 6 bits worth, | ||
26 | * and have one bit for the disk number. | ||
27 | -- | ||
28 | 1.8.0 | ||
29 | |||