* Small Bug in grub-core/partmap/amiga.c
@ 2010-12-30 6:29 ehem+grub
2010-12-31 13:56 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-12-31 14:08 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 2 replies; 3+ messages in thread
From: ehem+grub @ 2010-12-30 6:29 UTC (permalink / raw)
To: grub-devel
Alas, AmigaOS has mostly passed beyond the veil, but one can still find
small bugs sometimes:
=== modified file 'grub-core/partmap/amiga.c'
--- grub-core/partmap/amiga.c 2010-03-26 14:44:13 +0000
+++ grub-core/partmap/amiga.c 2010-12-30 06:25:26 +0000
@@ -87,7 +87,7 @@
if (grub_disk_read (disk, pos, 0, sizeof (rdsk), &rdsk))
return grub_errno;
- if (grub_strcmp ((char *) rdsk.magic, "RDSK") == 0)
+ if (grub_strncmp ((char *) rdsk.magic, "RDSK", sizeof(rdsk.magic)) == 0)
{
/* Found the first PART block. */
next = grub_be_to_cpu32 (rdsk.partitionlst);
I both like and dislike using strcmp() for this purpose. I kind of like
keeping it as a string, but strcmp()... Anyway, minimal solution.
--
(\___(\___(\______ --=> 8-) EHM <=-- ______/)___/)___/)
\BS ( | EHeM@gremlin.m5p.com PGP F6B23DE0 | ) /
\_CS\ | _____ -O #include <stddisclaimer.h> O- _____ | / _/
2477\___\_|_/DC21 03A0 5D61 985B <-PGP-> F2BE 6526 ABD2 F6B2\_|_/___/3DE0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Small Bug in grub-core/partmap/amiga.c
2010-12-30 6:29 Small Bug in grub-core/partmap/amiga.c ehem+grub
@ 2010-12-31 13:56 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-12-31 14:08 ` Vladimir 'φ-coder/phcoder' Serbinenko
1 sibling, 0 replies; 3+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2010-12-31 13:56 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 964 bytes --]
On 12/30/2010 07:29 AM, ehem+grub@m5p.com wrote:
> Alas, AmigaOS has mostly passed beyond the veil, but one can still find
> small bugs sometimes:
>
> === modified file 'grub-core/partmap/amiga.c'
> --- grub-core/partmap/amiga.c 2010-03-26 14:44:13 +0000
> +++ grub-core/partmap/amiga.c 2010-12-30 06:25:26 +0000
> @@ -87,7 +87,7 @@
> if (grub_disk_read (disk, pos, 0, sizeof (rdsk), &rdsk))
> return grub_errno;
>
> - if (grub_strcmp ((char *) rdsk.magic, "RDSK") == 0)
> + if (grub_strncmp ((char *) rdsk.magic, "RDSK", sizeof(rdsk.magic)) == 0)
> {
> /* Found the first PART block. */
> next = grub_be_to_cpu32 (rdsk.partitionlst);
>
>
> I both like and dislike using strcmp() for this purpose. I kind of like
> keeping it as a string, but strcmp()... Anyway, minimal solution.
>
>
Nice catch. I fixed it by using the correct grub_memcmp.
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Small Bug in grub-core/partmap/amiga.c
2010-12-30 6:29 Small Bug in grub-core/partmap/amiga.c ehem+grub
2010-12-31 13:56 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2010-12-31 14:08 ` Vladimir 'φ-coder/phcoder' Serbinenko
1 sibling, 0 replies; 3+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2010-12-31 14:08 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 988 bytes --]
On 12/30/2010 07:29 AM, ehem+grub@m5p.com wrote:
> Alas, AmigaOS has mostly passed beyond the veil, but one can still find
> small bugs sometimes:
>
BTW, Amiga partmap and filesystems support in GRUB is for AROS, not Amiga.
> === modified file 'grub-core/partmap/amiga.c'
> --- grub-core/partmap/amiga.c 2010-03-26 14:44:13 +0000
> +++ grub-core/partmap/amiga.c 2010-12-30 06:25:26 +0000
> @@ -87,7 +87,7 @@
> if (grub_disk_read (disk, pos, 0, sizeof (rdsk), &rdsk))
> return grub_errno;
>
> - if (grub_strcmp ((char *) rdsk.magic, "RDSK") == 0)
> + if (grub_strncmp ((char *) rdsk.magic, "RDSK", sizeof(rdsk.magic)) == 0)
> {
> /* Found the first PART block. */
> next = grub_be_to_cpu32 (rdsk.partitionlst);
>
>
> I both like and dislike using strcmp() for this purpose. I kind of like
> keeping it as a string, but strcmp()... Anyway, minimal solution.
>
>
>
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-31 14:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-30 6:29 Small Bug in grub-core/partmap/amiga.c ehem+grub
2010-12-31 13:56 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-12-31 14:08 ` Vladimir 'φ-coder/phcoder' Serbinenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).