Date: Mon, 6 Sep 2010 13:18:39 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Brian Somers <brian@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r212247 - head/sbin/fdisk Message-ID: <20100906111839.GB1851@garage.freebsd.pl> In-Reply-To: <20100906011318.3d5c0bb6@dev.lan.Awfulhak.org> References: <201009060415.o864Fntq011178@svn.freebsd.org> <20100906064142.GF1900@garage.freebsd.pl> <20100906011318.3d5c0bb6@dev.lan.Awfulhak.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--JgQwtEuHJzHdouWu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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@FreeBSD.org> w= rote: > > Your assumption that .eli can only be present at the end of provider na= me > > is incorrect. It can be eg. /dev/ad0s1a.eli.journal. > >=20 > > Another problem is that in memmove you cut the first 4 characters, not > > the last 4 characters. > >=20 > > I'm not sure, but can't you simply extend regular expression to: > >=20 > > "^(/dev/[a-z/]+[0-9]+)([sp][0-9]+)?[a-h]?(\.eli)?$" >=20 > 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 i= t being > at the end of the string. >=20 > The memmove doesn't cut the first four characters, it cuts the ".eli" str= ing.... > doesn't it? Yes, sorry for the noice, my reading of the code was incorrect. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --JgQwtEuHJzHdouWu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkyEzg4ACgkQForvXbEpPzQHHQCfZpO7tjgzY4JlOe6WXazO5CzZ /zYAnjoqf+i5vk9+fQa+9aDGymlNmhIg =6lkV -----END PGP SIGNATURE----- --JgQwtEuHJzHdouWu--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100906111839.GB1851>