grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Add support for /dev/md/N style mdraid devices


From: Felix Zielcke
Subject: Re: [PATCH] Add support for /dev/md/N style mdraid devices
Date: Fri, 01 Aug 2008 17:09:41 +0200

Am Freitag, den 01.08.2008, 15:12 +0200 schrieb Robert Millan:

> This looks fine, but I'd suggest to avoid hardcoding numbers when possible.  
> So
> if you're adding 5 because that's the size of "/dev/", I think it's a good 
> idea
> to use sizeof("/dev/")-1, and so on.  This way the code is much easier to
> understand IMHO.
> 
> (yes, I know the existing code above yours doesn't do this, but i think it's
> a good idea to push for higher quality standards anyway ;-))
> 

Attached are now 2 patches for my added code and the one above.
I personally prefer the strcpy one, there's no need to use memcpy, it
should never happen that the /dev/md* devices contain a ASCII NUL
Maybe there's a way to make it even better so please comment all of you
grub-devels :)

Attachment: memcpy.diff
Description: Text Data

Attachment: strcpy.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]