daemon: More reliable parsing of the output from 'parted print'.
authorRichard Jones <rjones@redhat.com>
Sat, 10 Apr 2010 12:17:50 +0000 (13:17 +0100)
committerRichard Jones <rjones@redhat.com>
Mon, 12 Apr 2010 18:04:13 +0000 (19:04 +0100)
commit7095bab6110a6e10d52c6c873082df8185aefd8c
tree1dfc3cc8e0cd17eecf436ac3c71914ad860e2459
parentb15faa431906acfee94245c2d951ea285eaf0d0b
daemon: More reliable parsing of the output from 'parted print'.

Previously we used strtok.  However this has the problem that
strtok considers multiple delimiter characters to be like a single
delimiter, eg. "1:::2" would be parsed the same as "1:2".  In
other words, the previous code would skip over or fail if there
are empty fields.
(cherry picked from commit cb9350019cc6382a35c98f522c9c4d221c92b605)
daemon/parted.c