]> sourceware.org Git - lvm2.git/commitdiff
Accept signed numbers in config file.
authorAlasdair Kergon <agk@redhat.com>
Tue, 15 Jul 2003 16:32:20 +0000 (16:32 +0000)
committerAlasdair Kergon <agk@redhat.com>
Tue, 15 Jul 2003 16:32:20 +0000 (16:32 +0000)
lib/config/config.c

index f51adf15d2e9d6a197a3f658e4f7d5b2d28a64c8..ce33c63f01b907311712547c528aafc82f0c4ddd 100644 (file)
@@ -502,7 +502,7 @@ static struct config_value *_value(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);
 
        if (!v)
@@ -637,6 +637,8 @@ static void _get_token(struct parser *p, int tok_prev)
        case '7':
        case '8':
        case '9':
+       case '+':
+       case '-':
                if (values_allowed) {
                        p->te++;
                        while ((p->te != p->fe) && (*p->te)) {
This page took 0.037051 seconds and 5 git commands to generate.