SYSLOG logic should use existing file interfaces, not re-invent them.

This commit is contained in:
Gregory Nutt
2016-07-05 12:12:44 -06:00
parent 3b825b3e00
commit a39ce80add
6 changed files with 85 additions and 61 deletions
+2 -1
View File
@@ -206,7 +206,8 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower,
* channels are enabled).
*/
nread = file_read(&g_adcfile, adcmsg, MAX_ADC_CHANNELS * sizeof(struct adc_msg_s));
nread = file_read(&g_adcfile, adcmsg,
MAX_ADC_CHANNELS * sizeof(struct adc_msg_s));
if (nread < 0)
{
int errcode = get_errno();
+2 -1
View File
@@ -205,7 +205,8 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower,
* channels are enabled).
*/
nread = file_read(&g_adcfile, adcmsg, MAX_ADC_CHANNELS * sizeof(struct adc_msg_s));
nread = file_read(&g_adcfile, adcmsg,
MAX_ADC_CHANNELS * sizeof(struct adc_msg_s));
if (nread < 0)
{
int errcode = get_errno();
+2 -1
View File
@@ -187,7 +187,8 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower,
* channels are enabled).
*/
nread = file_read(&g_adcfile, adcmsg, MAX_ADC_CHANNELS * sizeof(struct adc_msg_s));
nread = file_read(&g_adcfile, adcmsg,
MAX_ADC_CHANNELS * sizeof(struct adc_msg_s));
if (nread < 0)
{
int errcode = get_errno();