2014-12-09 18:09 GMT+01:00 walter harms <[email protected]>:
>
> 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 in this case, but possibly will be used by other utils
(it is in i2c-tools).
> btw:
> bb_perror_msg_and_die("Could not open file: "Could not open file:
> %s",filename) would work also ?
This would only show one of two possible filenames.
Bart
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox