mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 04:43:33 +08:00
drivers/, drivers/pipes, and drivers/serial file clean-up
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4944 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* drivers/ramdisk.c
|
||||
*
|
||||
* Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -166,6 +166,7 @@ static ssize_t rd_read(FAR struct inode *inode, unsigned char *buffer,
|
||||
nsectors * dev->rd_sectsize);
|
||||
return nsectors;
|
||||
}
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -204,6 +205,7 @@ static ssize_t rd_write(FAR struct inode *inode, const unsigned char *buffer,
|
||||
nsectors * dev->rd_sectsize);
|
||||
return nsectors;
|
||||
}
|
||||
|
||||
return -EFBIG;
|
||||
}
|
||||
#endif
|
||||
@@ -242,6 +244,7 @@ static int rd_geometry(FAR struct inode *inode, struct geometry *geometry)
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -264,11 +267,11 @@ static int rd_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
|
||||
DEBUGASSERT(inode && inode->i_private);
|
||||
if (cmd == BIOC_XIPBASE && ppv)
|
||||
{
|
||||
dev = (struct rd_struct_s *)inode->i_private;
|
||||
*ppv = (void*)dev->rd_buffer;
|
||||
dev = (struct rd_struct_s *)inode->i_private;
|
||||
*ppv = (void*)dev->rd_buffer;
|
||||
|
||||
fvdbg("ppv: %p\n", *ppv);
|
||||
return OK;
|
||||
fvdbg("ppv: %p\n", *ppv);
|
||||
return OK;
|
||||
}
|
||||
|
||||
return -ENOTTY;
|
||||
|
||||
Reference in New Issue
Block a user