1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Accept signed numbers in config file.

This commit is contained in:
Alasdair Kergon 2003-07-15 16:32:20 +00:00
parent 50785e12df
commit 21a1fa4701

View File

@ -502,7 +502,7 @@ static struct config_value *_value(struct parser *p)
static struct config_value *_type(struct parser *p) static struct config_value *_type(struct parser *p)
{ {
/* [0-9]+ | [0-9]*\.[0-9]* | ".*" */ /* [+-]{0,1}[0-9]+ | [0-9]*\.[0-9]* | ".*" */
struct config_value *v = _create_value(p); struct config_value *v = _create_value(p);
if (!v) if (!v)
@ -637,6 +637,8 @@ static void _get_token(struct parser *p, int tok_prev)
case '7': case '7':
case '8': case '8':
case '9': case '9':
case '+':
case '-':
if (values_allowed) { if (values_allowed) {
p->te++; p->te++;
while ((p->te != p->fe) && (*p->te)) { while ((p->te != p->fe) && (*p->te)) {