mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
SYSLOG logic should use existing file interfaces, not re-invent them.
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user