svn commit: r212247 - head/sbin/fdisk

Pawel Jakub Dawidek pjd at FreeBSD.org
Mon Sep 6 11:18:55 UTC 2010


On Mon, Sep 06, 2010 at 01:13:18AM -0700, Brian Somers wrote:
> On Mon, 6 Sep 2010 08:41:42 +0200 Pawel Jakub Dawidek <pjd at FreeBSD.org> wrote:
> > Your assumption that .eli can only be present at the end of provider name
> > is incorrect. It can be eg. /dev/ad0s1a.eli.journal.
> > 
> > Another problem is that in memmove you cut the first 4 characters, not
> > the last 4 characters.
> > 
> > I'm not sure, but can't you simply extend regular expression to:
> > 
> > 	"^(/dev/[a-z/]+[0-9]+)([sp][0-9]+)?[a-h]?(\.eli)?$"
> 
> You've lost me here.  I remove .eli from the device name specifically so that we
> handle it being *anywhere* in the string.  Your suggestion only handles it being
> at the end of the string.
> 
> The memmove doesn't cut the first four characters, it cuts the ".eli" string....
> doesn't it?

Yes, sorry for the noice, my reading of the code was incorrect.

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20100906/45aa4393/attachment.pgp


More information about the svn-src-head mailing list