drivers/pipe: Add g_ prefix to pipe_fops and fifo_fops

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-02-06 00:03:15 +08:00 committed by Xiang Xiao
parent 0499979908
commit 345d2ac227
2 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@
* Private Data
****************************************************************************/
static const struct file_operations fifo_fops =
static const struct file_operations g_fifo_fops =
{
pipecommon_open, /* open */
pipecommon_close, /* close */
@ -104,7 +104,7 @@ int nx_mkfifo(FAR const char *pathname, mode_t mode, size_t bufsize)
return -ENOMEM;
}
ret = register_driver(pathname, &fifo_fops, mode, (FAR void *)dev);
ret = register_driver(pathname, &g_fifo_fops, mode, (FAR void *)dev);
if (ret != 0)
{
pipecommon_freedev(dev);

View File

@ -59,7 +59,7 @@ static int pipe_close(FAR struct file *filep);
* Private Data
****************************************************************************/
static const struct file_operations pipe_fops =
static const struct file_operations g_pipe_fops =
{
pipecommon_open, /* open */
pipe_close, /* close */
@ -193,7 +193,7 @@ static int pipe_register(size_t bufsize, int flags,
/* Register the pipe device */
ret = register_driver(devname, &pipe_fops, 0666, (FAR void *)dev);
ret = register_driver(devname, &g_pipe_fops, 0666, (FAR void *)dev);
if (ret != 0)
{
nxsem_post(&g_pipesem);