diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-07-31 23:45:21 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-07-31 23:45:21 +0000 |
commit | 4a16b1826cafc353fa90826cbd4416476f1ea682 (patch) | |
tree | 323f6bd35c6522a6c72895c19f536742f822f54e /nuttx/arch/arm/src/lpc2378/lpc23xx_serial.c | |
parent | 505963a3568ba0dc23cb0cb7b3efee58f83a49ea (diff) | |
download | px4-nuttx-4a16b1826cafc353fa90826cbd4416476f1ea682.tar.gz px4-nuttx-4a16b1826cafc353fa90826cbd4416476f1ea682.tar.bz2 px4-nuttx-4a16b1826cafc353fa90826cbd4416476f1ea682.zip |
LPC17xx serial now supports minimal termios ioctls; serial driver ioctl methods should not set errno variable
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4994 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/lpc2378/lpc23xx_serial.c')
-rwxr-xr-x | nuttx/arch/arm/src/lpc2378/lpc23xx_serial.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_serial.c b/nuttx/arch/arm/src/lpc2378/lpc23xx_serial.c index 69738dae5..4f20cc7fd 100755 --- a/nuttx/arch/arm/src/lpc2378/lpc23xx_serial.c +++ b/nuttx/arch/arm/src/lpc2378/lpc23xx_serial.c @@ -3,6 +3,7 @@ * * Copyright (C) 2010 Rommel Marcelo. All rights reserved. * Author: Rommel Marcelo + * With updates by: Gregory Nutt <gnutt@nuttx.org> * * This file is part of the NuttX RTOS and based on the lpc2148 port: * @@ -696,8 +697,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg) struct up_dev_s *user = (struct up_dev_s *)arg; if (!user) { - *get_errno_ptr() = EINVAL; - ret = ERROR; + ret = -EINVAL; } else { @@ -726,8 +726,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg) break; default: - *get_errno_ptr() = ENOTTY; - ret = ERROR; + ret = -ENOTTY; break; } |