Message ID | 8284518232696c8cb23dbaeb8cb502ba8183c853.1357723114.git.kibo@prevas.dk |
---|---|
State | Accepted |
Delegated to: | Esben Haabendal |
Headers | show |
Kim Bøndergaard <kibo@prevas.dk> writes: > --- > recipes/makedevs/makedevs-1.0.0/makedevs.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/recipes/makedevs/makedevs-1.0.0/makedevs.c b/recipes/makedevs/makedevs-1.0.0/makedevs.c > index 4953d79..5a017c5 100644 > --- a/recipes/makedevs/makedevs-1.0.0/makedevs.c > +++ b/recipes/makedevs/makedevs-1.0.0/makedevs.c > @@ -196,7 +196,7 @@ static int interpret_table_entry(char *line) > > if (0 > sscanf(line, "%40s %c %lo %lu %lu %lu %lu %lu %lu %20s", path, > &type, &mode, &uid, &gid, &major, &minor, &start, > - &increment, &countstr)) > + &increment, countstr)) > { > return 1; > } > @@ -205,9 +205,8 @@ static int interpret_table_entry(char *line) > pcountstr++; > do_hex = 1; > } > - if (0 > sscanf(pcountstr,"%lu", &count)) { > - return 1; > - } > + sscanf(pcountstr,"%lu", &count); > + > if (!strcmp(path, "/")) { > error_msg_and_die("Device table entries require absolute paths"); > } Merged to master, thanks. /Esben
diff --git a/recipes/makedevs/makedevs-1.0.0/makedevs.c b/recipes/makedevs/makedevs-1.0.0/makedevs.c index 4953d79..5a017c5 100644 --- a/recipes/makedevs/makedevs-1.0.0/makedevs.c +++ b/recipes/makedevs/makedevs-1.0.0/makedevs.c @@ -196,7 +196,7 @@ static int interpret_table_entry(char *line) if (0 > sscanf(line, "%40s %c %lo %lu %lu %lu %lu %lu %lu %20s", path, &type, &mode, &uid, &gid, &major, &minor, &start, - &increment, &countstr)) + &increment, countstr)) { return 1; } @@ -205,9 +205,8 @@ static int interpret_table_entry(char *line) pcountstr++; do_hex = 1; } - if (0 > sscanf(pcountstr,"%lu", &count)) { - return 1; - } + sscanf(pcountstr,"%lu", &count); + if (!strcmp(path, "/")) { error_msg_and_die("Device table entries require absolute paths"); }