diff --git a/drivers/Makefile b/drivers/Makefile index 53eff3f11d29b5e9e89d526557c1e74355eb94b4..55e7030158fe3ab48f5f39a144824dc061191004 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -44,7 +44,7 @@ AOBJS = $(ASRCS:.S=$(OBJEXT)) CSRCS = ifneq ($(CONFIG_NFILE_DESCRIPTORS),0) -CSRCS += dev_null.c dev_zero.c pipe.c fifo.c pipe-common.c serial.c lowconsole.c can.c +CSRCS += dev_null.c dev_zero.c pipe.c fifo.c pipe_common.c serial.c lowconsole.c can.c ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y) CSRCS += ramdisk.c endif diff --git a/drivers/fifo.c b/drivers/fifo.c index 9ad64dbcb2ebf25aba2f450a49c44a61b4fbfbfa..2465d41dcc2d0f075cbda58d5056ce05485cf3f9 100644 --- a/drivers/fifo.c +++ b/drivers/fifo.c @@ -47,7 +47,7 @@ #include <nuttx/fs.h> #include <errno.h> -#include "pipe-common.h" +#include "pipe_common.h" #if CONFIG_DEV_PIPE_SIZE > 0 diff --git a/drivers/pipe.c b/drivers/pipe.c index 5e0b2f6e5a299d7c0e3da52cef41244c9e156c12..677bcfe4cdf0d0c57cb515a991d0d297655557ab 100644 --- a/drivers/pipe.c +++ b/drivers/pipe.c @@ -51,7 +51,7 @@ #include <fcntl.h> #include <errno.h> -#include "pipe-common.h" +#include "pipe_common.h" #if CONFIG_DEV_PIPE_SIZE > 0 @@ -178,7 +178,7 @@ static int pipe_close(FAR struct file *filep) ****************************************************************************/ int pipe(int filedes[2]) { - struct pipe_dev_s *dev; + struct pipe_dev_s *dev = NULL; char devname[16]; int pipeno; int err; diff --git a/drivers/pipe-common.c b/drivers/pipe_common.c similarity index 99% rename from drivers/pipe-common.c rename to drivers/pipe_common.c index 198d9d12981b8b600125ac933fbda4d8b8561204..59b9f79c8ed816891797a6698d99ab130a0aedc1 100644 --- a/drivers/pipe-common.c +++ b/drivers/pipe_common.c @@ -1,5 +1,5 @@ /**************************************************************************** - * drivers/pipe-common.c + * drivers/pipe_common.c * * Copyright (C) 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> @@ -54,7 +54,7 @@ #include <assert.h> #include <nuttx/fs.h> -#include "pipe-common.h" +#include "pipe_common.h" #if CONFIG_DEV_PIPE_SIZE > 0 @@ -83,6 +83,7 @@ static void pipecommon_semtake(sem_t *sem); /**************************************************************************** * Name: pipecommon_semtake ****************************************************************************/ + static void pipecommon_semtake(sem_t *sem) { while (sem_wait(sem) != 0) @@ -102,6 +103,7 @@ static void pipecommon_semtake(sem_t *sem) /**************************************************************************** * Name: pipecommon_allocdev ****************************************************************************/ + FAR struct pipe_dev_s *pipecommon_allocdev(void) { struct pipe_dev_s *dev; @@ -124,7 +126,8 @@ FAR struct pipe_dev_s *pipecommon_allocdev(void) /**************************************************************************** * Name: pipecommon_freedev ****************************************************************************/ - void pipecommon_freedev(FAR struct pipe_dev_s *dev) + +void pipecommon_freedev(FAR struct pipe_dev_s *dev) { sem_destroy(&dev->d_bfsem); sem_destroy(&dev->d_rdsem); @@ -135,6 +138,7 @@ FAR struct pipe_dev_s *pipecommon_allocdev(void) /**************************************************************************** * Name: pipecommon_open ****************************************************************************/ + int pipecommon_open(FAR struct file *filep) { struct inode *inode = filep->f_inode; @@ -212,6 +216,7 @@ int pipecommon_open(FAR struct file *filep) /**************************************************************************** * Name: pipecommon_close ****************************************************************************/ + int pipecommon_close(FAR struct file *filep) { struct inode *inode = filep->f_inode; @@ -280,6 +285,7 @@ int pipecommon_close(FAR struct file *filep) /**************************************************************************** * Name: pipecommon_read ****************************************************************************/ + ssize_t pipecommon_read(FAR struct file *filep, FAR char *buffer, size_t len) { struct inode *inode = filep->f_inode; @@ -362,6 +368,7 @@ ssize_t pipecommon_read(FAR struct file *filep, FAR char *buffer, size_t len) /**************************************************************************** * Name: pipecommon_write ****************************************************************************/ + ssize_t pipecommon_write(FAR struct file *filep, FAR const char *buffer, size_t len) { struct inode *inode = filep->f_inode; diff --git a/drivers/pipe-common.h b/drivers/pipe_common.h similarity index 99% rename from drivers/pipe-common.h rename to drivers/pipe_common.h index 12fd72222693095c2d15670fb1981ae33a06326b..34bde18c37766400c9b7a242636acfbe4eb2b214 100644 --- a/drivers/pipe-common.h +++ b/drivers/pipe_common.h @@ -1,5 +1,5 @@ /**************************************************************************** - * drivers/pipe-common.h + * drivers/pipe_common.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr>