Lines Matching defs:match
136 struct match {
163 struct match match;
514 free(s->match.name);
515 free(s->match.dmi);
516 free(s->match.dt);
554 if ((s_)->match.bits & (bit_)) goto out; \
555 (s_)->match.bits |= (bit_); \
562 s->match.name = safe_strdup(value);
566 s->match.bus = BT_USB;
568 s->match.bus = BT_BLUETOOTH;
570 s->match.bus = BT_PS2;
572 s->match.bus = BT_RMI;
574 s->match.bus = BT_I2C;
576 s->match.bus = BT_SPI;
586 s->match.vendor = vendor;
594 s->match.product = product;
602 s->match.version = version;
611 s->match.dmi = safe_strdup(value);
615 s->match.udev_type = UDEV_TOUCHPAD;
617 s->match.udev_type = UDEV_MOUSE;
619 s->match.udev_type = UDEV_POINTINGSTICK;
621 s->match.udev_type = UDEV_KEYBOARD;
623 s->match.udev_type = UDEV_JOYSTICK;
625 s->match.udev_type = UDEV_TABLET;
627 s->match.udev_type = UDEV_TABLET_PAD;
632 s->match.dt = safe_strdup(value);
634 qlog_error(ctx, "Unknown match key '%s'\n", key);
1260 match_fill_name(struct match *m,
1283 match_fill_bus_vid_pid(struct match *m,
1333 match_fill_udev_type(struct match *m,
1358 match_fill_dmi_dt(struct match *m, char *dmi, char *dt)
1371 static struct match *
1375 struct match *m = zalloc(sizeof *m);
1385 match_free(struct match *m)
1477 struct match *m,
1485 if ((s->match.bits & flag) == 0)
1488 /* Couldn't fill in this bit for the match, so we
1489 * do not match on it */
1500 if (fnmatch(s->match.name, m->name, 0) == 0)
1504 if (m->bus == s->match.bus)
1508 if (m->vendor == s->match.vendor)
1512 if (m->product == s->match.product)
1516 if (m->version == s->match.version)
1520 if (fnmatch(s->match.dmi, m->dmi, 0) == 0)
1524 if (fnmatch(s->match.dt, m->dt, 0) == 0)
1528 if (s->match.udev_type & m->udev_type)
1543 if (s->match.bits == matched_flags) {
1544 qlog_debug(ctx, "%s is full match\n", s->name);
1557 struct match *m;