[PATCH libevdev] tools: print the hwdb match line from the dpi tool

Peter Hutterer peter.hutterer at who-t.net
Mon Dec 1 15:51:23 PST 2014


On Mon, Dec 01, 2014 at 11:07:19AM -0500, Benjamin Tissoires wrote:
> Hi Peter,
> 
> On Sun, Nov 30, 2014 at 11:59 PM, Peter Hutterer
> <peter.hutterer at who-t.net> wrote:
> > Let's make this as easy as possible
> >
> > Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> > ---
> >  tools/mouse-dpi-tool.c | 27 +++++++++++++++++++++++++++
> >  1 file changed, 27 insertions(+)
> >
> > diff --git a/tools/mouse-dpi-tool.c b/tools/mouse-dpi-tool.c
> > index f063028..65403de 100644
> > --- a/tools/mouse-dpi-tool.c
> > +++ b/tools/mouse-dpi-tool.c
> > @@ -183,6 +183,23 @@ print_summary(struct measurements *m)
> >         }
> >  }
> >
> > +static inline const char*
> > +bustype(int bustype)
> > +{
> > +       const char *bus;
> > +
> > +       switch(bustype) {
> > +               case BUS_PCI: bus = "pci"; break;
> > +               case BUS_ISAPNP: bus = "isapnp"; break;
> > +               case BUS_USB: bus = "usb"; break;
> > +               case BUS_HIL: bus = "hil"; break;
> > +               case BUS_BLUETOOTH: bus = "bluetooth"; break;
> > +               case BUS_VIRTUAL: bus = "pci"; break;
> 
> Are you sure we should return "pci" for BUS_VIRTUAL?
> 
> Also, we may need a "default" case here or I can not guarantee the
> content of bus.

both fixed, and pushed. thanks

Cheers,
   Peter
 


More information about the Input-tools mailing list