diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-02-02 15:04:39 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-02-02 15:04:39 +0000 |
commit | 2ce27097bd692980027f29e6b616561b912e7e94 (patch) | |
tree | ae20dad6a8ab620c04d8fb4b219f13e103c5fd4f /nuttx/drivers/dev_zero.c | |
parent | bdbd2711a3c047dec514e87399f20aa0960111e3 (diff) | |
download | px4-nuttx-2ce27097bd692980027f29e6b616561b912e7e94.tar.gz px4-nuttx-2ce27097bd692980027f29e6b616561b912e7e94.tar.bz2 px4-nuttx-2ce27097bd692980027f29e6b616561b912e7e94.zip |
Fix /dev/zero
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@616 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers/dev_zero.c')
-rw-r--r-- | nuttx/drivers/dev_zero.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nuttx/drivers/dev_zero.c b/nuttx/drivers/dev_zero.c index 7116758b4..a18509415 100644 --- a/nuttx/drivers/dev_zero.c +++ b/nuttx/drivers/dev_zero.c @@ -52,8 +52,8 @@ * Private Function Prototypes ****************************************************************************/ -static ssize_t devzero_read(struct file *, char *, size_t); -static ssize_t devzero_write(struct file *, const char *, size_t); +static ssize_t devzero_read(FAR struct file *, FAR char *, size_t); +static ssize_t devzero_write(FAR struct file *, FAR const char *, size_t); /**************************************************************************** * Private Data @@ -73,14 +73,14 @@ static struct file_operations devzero_fops = * Private Functions ****************************************************************************/ -static ssize_t devzero_read(struct file *filp, char *buffer, size_t len) +static ssize_t devzero_read(FAR struct file *filp, FAR char *buffer, size_t len) { - return 0; /* Return EOF */ + memset(buffer, 0, len); + return len; } -static ssize_t devzero_write(struct file *filp, const char *buffer, size_t len) +static ssize_t devzero_write(FAR struct file *filp, FAR const char *buffer, size_t len) { - memset(buffer, 0, len); return len; } |