- /* check presence of keys according to method type */
- switch (dev.type) {
- case LABEL:
- dbg_parse(TYPE_LABEL " name='%s', bus='%s', "
- "sysfs_file[0]='%s', sysfs_value[0]='%s', symlink='%s'",
- dev.name, dev.bus, dev.sysfs_pair[0].file,
- dev.sysfs_pair[0].value, dev.symlink);
- if ((*dev.name == '\0') ||
- (*dev.sysfs_pair[0].file == '\0') ||
- (*dev.sysfs_pair[0].value == '\0'))
- goto error;
- break;
- case NUMBER:
- dbg_parse(TYPE_NUMBER "name='%s', bus='%s', id='%s', symlink='%s'",
- dev.name, dev.bus, dev.id, dev.symlink);
- if ((*dev.name == '\0') ||
- (*dev.bus == '\0') ||
- (*dev.id == '\0'))
- goto error;
- break;
- case TOPOLOGY:
- dbg_parse(TYPE_TOPOLOGY "name='%s', bus='%s', "
- "place='%s', symlink='%s'",
- dev.name, dev.bus, dev.place, dev.symlink);
- if ((*dev.name == '\0') ||
- (*dev.bus == '\0') ||
- (*dev.place == '\0'))
- goto error;
- break;
- case REPLACE:
- dbg_parse(TYPE_REPLACE "name='%s', kernel_name='%s', symlink='%s'",
- dev.name, dev.kernel_name, dev.symlink);
- if ((*dev.name == '\0') ||
- (*dev.kernel_name == '\0'))
- goto error;
- break;
- case CALLOUT:
- dbg_parse(TYPE_CALLOUT "name='%s', bus='%s', program='%s', "
- "id='%s', symlink='%s'",
- dev.name, dev.bus, dev.exec_program,
- dev.id, dev.symlink);
- if ((*dev.name == '\0') ||
- (*dev.id == '\0') ||
- (*dev.exec_program == '\0'))
- goto error;
- break;
- default:
- dbg_parse("unknown type of method");