[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [RFC][PATCH v3 2/2] new applets: i2c-tools
From:       Bartosz_Gołaszewski <bartekgola () gmail ! com>
Date:       2014-12-18 9:37:32
Message-ID: CAFdkumhirpCkUi9_TvHHo+aYMhFb-eTQuWucqoCCcJCu3TDNqA () mail ! gmail ! com
[Download RAW message or body]

2014-12-16 14:21 GMT+01:00 tito <farmatito@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
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic