+ cur = 0;
+ while (cur < bufsize && !found) {
+ count = buf_get_line(buf, bufsize, cur);
+ bufline = &buf[cur];
+ cur += count+1;
+
+ switch(bufline[0]) {
+ case 'N':
+ case 'S':
+ if (count > sizeof(nodename))
+ count = sizeof(nodename);
+ memcpy(nodename, &bufline[2], count-2);
+ nodename[count-2] = '\0';
+ dbg("compare '%s' '%s'", nodename, name);
+ if (strcmp(nodename, name) == 0) {
+ db_file_to_devpath(ent->d_name, devpath, len);
+ found = 1;
+ }
+ break;
+ default:
+ continue;