+ cur = 0;
+ while (cur < bufsize) {
+ count = buf_get_line(buf, bufsize, cur);
+ bufline = &buf[cur];
+ cur += count+1;
+
+ switch(bufline[0]) {
+ case 'P':
+ if (count > DEVPATH_SIZE)
+ count = DEVPATH_SIZE-1;
+ strncpy(udev->devpath, &bufline[2], count-2);
+ break;
+ case 'N':
+ if (count > NAME_SIZE)
+ count = NAME_SIZE-1;
+ strncpy(udev->name, &bufline[2], count-2);
+ break;
+ case 'S':
+ if (count > NAME_SIZE)
+ count = NAME_SIZE-1;
+ strncpy(udev->symlink, &bufline[2], count-2);
+ break;
+ case 'A':
+ strfieldcpy(line, &bufline[2]);
+ udev->partitions = atoi(line);
+ break;
+ }
+ }