diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-02-12 02:53:01 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-02-12 02:53:01 +0000 |
commit | e4f5a605d7c328e342146cec55cf233a976fadd4 (patch) | |
tree | e8e7dcab12941f0b60901f00cc4520f17ab3c196 /nuttx/drivers | |
parent | 56959f5762015fc1fd3ef43310040613c5d936aa (diff) | |
download | px4-nuttx-e4f5a605d7c328e342146cec55cf233a976fadd4.tar.gz px4-nuttx-e4f5a605d7c328e342146cec55cf233a976fadd4.tar.bz2 px4-nuttx-e4f5a605d7c328e342146cec55cf233a976fadd4.zip |
Fix some typos and compilation errors introduced in the last checkin
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4384 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers')
-rw-r--r-- | nuttx/drivers/ramlog.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/nuttx/drivers/ramlog.c b/nuttx/drivers/ramlog.c index 53e57b1a0..6c24b0f95 100644 --- a/nuttx/drivers/ramlog.c +++ b/nuttx/drivers/ramlog.c @@ -419,6 +419,14 @@ static ssize_t ramlog_write(FAR struct file *filep, FAR const char *buffer, size ch = buffer[nwritten]; + /* Ignore carriage returns */ + +#ifdef CONFIG_RAMLOG_CRLF + if (ch == '\r') + { + continue; + } + /* Pre-pend a carriage before a linefeed */ if (ch == '\n') @@ -434,6 +442,7 @@ static ssize_t ramlog_write(FAR struct file *filep, FAR const char *buffer, size break; } } +#endif /* Then output the character */ @@ -732,6 +741,14 @@ int ramlog_putc(int ch) FAR struct ramlog_dev_s *priv = &g_sysdev; int ret; + /* Ignore carriage returns */ + +#ifdef CONFIG_RAMLOG_CRLF + if (ch == '\r') + { + return ch; + } + /* Pre-pend a newline with a carriage return */ if (ch == '\n') @@ -747,6 +764,7 @@ int ramlog_putc(int ch) return ch; } } +#endif (void)ramlog_addchar(priv, ch); return ch; |