Re: [PATCH] Config: select PLATFORM_LINUX if using sendfile()

2014-12-10 Thread Bartosz Gołaszewski
2014-12-10 14:20 GMT+01:00 Ralf Friedl : > I suggest ddoing it the other way, enable sendfile only for Linux. > As it is, sendfile is enabled by default, which would automatically select > Linux, which might select other things that don't work on non-Linux systems. > There are many config options

Re: [PATCH] Config: select PLATFORM_LINUX if using sendfile()

2014-12-10 Thread Ralf Friedl
Bartosz Golaszewski wrote: Man entry for sendfile: Not specified in POSIX.1-2001, or other standards. Other UNIX systems implement sendfile() with different semantics and prototypes. It should not be used in portable programs. Select PLATFORM_LINUX if enabling FEATURE_USE_SENDFILE.

Re: [RFC] new applets: i2c-tools

2014-12-10 Thread walter harms
Am 10.12.2014 13:25, schrieb Bartosz Gołaszewski: > 2014-12-10 11:54 GMT+01:00 walter harms : >> ok, >> but given that busybox is not used by pple it seems reasonable to check only >> for one target. >> either automatic >> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) /* used in loop.c */ >>

Re: [PATCH] Config: select PLATFORM_LINUX if using sendfile()

2014-12-10 Thread Denys Vlasenko
Applied, thanks! On Wed, Dec 10, 2014 at 1:34 PM, Bartosz Golaszewski wrote: > Man entry for sendfile: > > Not specified in POSIX.1-2001, or other standards. > > Other UNIX systems implement sendfile() with different semantics and > prototypes. It should not be used in portable programs.

Re: [PATCH] flashcp: change BUFSIZE to 4k

2014-12-10 Thread Denys Vlasenko
On Thu, Dec 4, 2014 at 2:33 PM, Jacob Kjaergaard wrote: > some flash partitions can be smaller than the existing BUFSIZE thus write > BUFSIZE will fail with "no space left on device" > --- > miscutils/flashcp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/miscutils/fla

[PATCH] Config: select PLATFORM_LINUX if using sendfile()

2014-12-10 Thread Bartosz Golaszewski
Man entry for sendfile: Not specified in POSIX.1-2001, or other standards. Other UNIX systems implement sendfile() with different semantics and prototypes. It should not be used in portable programs. Select PLATFORM_LINUX if enabling FEATURE_USE_SENDFILE. Signed-off-by: Bartosz Golaszew

Re: [RFC] new applets: i2c-tools

2014-12-10 Thread Bartosz Gołaszewski
2014-12-10 11:54 GMT+01:00 walter harms : > ok, > but given that busybox is not used by pple it seems reasonable to check only > for one target. > either automatic > #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) /* used in loop.c */ > or manual: let the user decide via busybox.conf > re, > wh

Re: [RFC] new applets: i2c-tools

2014-12-10 Thread walter harms
Am 10.12.2014 11:20, schrieb Bartosz Gołaszewski: > 2014-12-09 18:09 GMT+01:00 walter harms : >> >> could you please explain shortly why you have a external buffer here ? >> >> you could easly do >> filename=xasprintf("/dev/i2c-%d", i2cbus); >> or >> char filename[32]; >> or > > This is done to

Re: [RFC] new applets: i2c-tools

2014-12-10 Thread Bartosz Gołaszewski
2014-12-09 18:09 GMT+01:00 walter harms : > > could you please explain shortly why you have a external buffer here ? > > you could easly do > filename=xasprintf("/dev/i2c-%d", i2cbus); > or > char filename[32]; > or This is done to pass the filename to the calling function. It isn't used by i2cget

Re: [RFC] new applets: i2c-tools

2014-12-10 Thread Bartosz Gołaszewski
2014-12-10 8:47 GMT+01:00 AGATE Stephen : > It's not difficult to use the original if you need it: This holds true for many other tools implemented in busybox and yet they're there. To use i2c-tools you need the whole dynamic loading infrastructure (libi2c.so) and four or more executables. Thanks