[RFC][PATCH v3 2/2] new applets: i2c-tools

Bartosz Gołaszewski bartekgola at gmail.com
Thu Dec 18 09:37:32 UTC 2014


2014-12-16 14:21 GMT+01:00 tito <farmatito at tiscali.it>:
> Hi,
> seems to me that i2cget and i2cset share a lot of code,
> couldn't they be condensed in one applet like it is
> done for example in  deluser.c:
>
> int do_deluser = (ENABLE_DELUSER && (!ENABLE_DELGROUP || applet_name[3] == 'u'));
>

Actually it's rather i2cdump which shares code with i2cset. The only
code shared between i2cset and i2cget is the argument parsing and
address/bus lookups which indeed can probably be moved to a single
function but I'll get to such optimizations later on after finishing
i2cdetect.

Bart


More information about the busybox mailing list