Re: K750 fixes in hidpp-rework branch

2013-09-02 Thread Martin Pitt
Hello Peter, Peter Wu [2013-09-02 11:54 +0200]: > Oh actually, I thought it was about the read()s. I assumed that the write > would be very fast, not having a time to get interrupted. This has never > shown > an issue so far, so I did not bother checking for it. OK. This looks good to me now,

[PATCH] linux: Allow valid UTF-8 encoded string.

2013-09-02 Thread Shih-Yuan Lee (FourDollars)
From: "Shih-Yuan Lee (FourDollars)" --- src/linux/up-device-supply.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c index cc192c7..fbfaeca 100644 --- a/src/linux/up-device-supply.c +++ b/src/linux/up-device-supply.c @@ -441,6

Re: The developing daily builds PPA of UPower for Ubuntu.

2013-09-02 Thread Martin Pitt
Hello Shih-Yuan, Shih-Yuan Lee (FourDollars) [2013-09-03 11:31 +0800]: > I set up https://launchpad.net/~fourdollars/+archive/upower to build > from the latest source code of git repository. > It is not intent to be a daily use. > I use it for debug only. > I hope it will benefit the development o

The developing daily builds PPA of UPower for Ubuntu.

2013-09-02 Thread Shih-Yuan Lee (FourDollars)
Hi, I set up https://launchpad.net/~fourdollars/+archive/upower to build from the latest source code of git repository. It is not intent to be a daily use. I use it for debug only. I hope it will benefit the development of UPower. Regards, $4 ___ devkit

Re: K750 fixes in hidpp-rework branch

2013-09-02 Thread Peter Wu
On Monday 02 September 2013 11:34:47 Martin Pitt wrote: > Peter Wu [2013-09-02 11:22 +0200]: > > > - hidpp_device_cmd(): > > >+ Do we need to check for EINTR in the write()? Or are all > > > > > > commands very tiny and thus the chance of EINTRing is negligible? > > > > When trying t

[PATCH v3] linux: Detect the battery of bluetooth input devices.

2013-09-02 Thread Shih-Yuan Lee (FourDollars)
From: "Shih-Yuan Lee (FourDollars)" First, checking the device path. If it contains 'bluetooth', it is a bluetooth devices. Second, checking if there is an input folder. If there is mouse folder under the input folder, it is a mouse device. Otherwise, it is a keyboard device. --- src/linux/up-de

Re: [PATCH v2] linux: Detect the battery of bluetooth input devices.

2013-09-02 Thread Peter Wu
Hi, On Monday 02 September 2013 17:41:17 Shih-Yuan Lee wrote: > I use "if (foo = bar)" to replace the following two lines. > > foo = bar > if (foo != NULL) I meant using this instead: if ((foo = bar)) GCC warning: warning: suggest parentheses around assignment used as truth value [- Wparen

Re: K750 fixes in hidpp-rework branch

2013-09-02 Thread Martin Pitt
Hey Peter, Peter Wu [2013-09-02 11:22 +0200]: > > - hidpp_device_cmd(): > >+ Do we need to check for EINTR in the write()? Or are all > > commands very tiny and thus the chance of EINTRing is negligible? > > When trying to debug, I encountered a few times that write/read fails due to >

Re: [PATCH v2] linux: Detect the battery of bluetooth input devices.

2013-09-02 Thread Peter Wu
Hi, This looks fine to me, but wouldn't the compiler give a notice about: if (foo = bar) (when it thinks that you meant foo == bar instead?) On Monday 02 September 2013 16:53:14 Shih-Yuan Lee wrote: > From: "Shih-Yuan Lee (FourDollars)" > > First, checking the device path. If it contains '

Re: K750 fixes in hidpp-rework branch

2013-09-02 Thread Peter Wu
Hi Martin, Thank you for your feedback, a general review of the structure is also helful. On Monday 02 September 2013 07:00:48 Martin Pitt wrote: > I'm afraid I can't help much with the actual protocol bits, but some > general/logic things that caught my eye: > > - hidpp_device_print_buffer() >

[PATCH v2] linux: Detect the battery of bluetooth input devices.

2013-09-02 Thread Shih-Yuan Lee (FourDollars)
From: "Shih-Yuan Lee (FourDollars)" First, checking the device path. If it contains 'bluetooth', it is a bluetooth devices. Second, checking if there is an input folder. If there is mouse folder under the input folder, it is a mouse device. Otherwise, it is a keyboard device. --- src/linux/up-de