return 1;
}
- while (fscanf(fp, "%255[a-zA-Z0-9 :.,/]\n", line) == 1) {
+ while (fscanf(fp, "%255[a-zA-Z0-9 :.,/_-]\n", line) == 1) {
if (strstr(line, "Device") != NULL) continue;
if (sscanf(line, "%s %s %u %u %u %u %s %s %u %u %s",
&dm.device[0], &dm.model[0], &dm.host, &dm.bus,
char *make_dev_hdr(char *pad, size_t len, struct d_info *dip)
{
- if (dip->map == NULL) {
+ if (dip->map == NULL)
snprintf(pad, len, "(%3d,%3d)",
MAJOR(dip->device), MINOR(dip->device));
- }
- else {
- snprintf(pad, len, "[%3d,%3d]",
- dip->map->host, dip->map->target);
- }
+ else
+ snprintf(pad, len, "%s", dip->map->device);
return pad;
}