fs/driver: update comments about block_proxy()

Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
This commit is contained in:
Juha Niskanen 2021-01-22 15:25:03 +02:00 committed by Abdelatif Guettouche
parent 7f2317e90a
commit eaa34b458a
3 changed files with 11 additions and 30 deletions

View File

@ -99,22 +99,14 @@ int find_blockdriver(FAR const char *pathname, int mountflags,
* oriented accessed to the block driver.
*
* Input Parameters:
* filep - The caller provided location in which to return the 'struct
* file' instance.
* blkdev - The path to the block driver
* oflags - Character driver open flags
*
* Returned Value:
* If positive, non-zero file descriptor is returned on success. This
* is the file descriptor of the nameless character driver that mediates
* accesses to the block driver.
*
* Errors that may be returned:
*
* ENOMEM - Failed to create a temporary path name.
*
* Plus:
*
* - Errors reported from bchdev_register()
* - Errors reported from open() or unlink()
* Zero (OK) is returned on success. On failure, a negated errno value is
* returned.
*
****************************************************************************/

View File

@ -128,22 +128,14 @@ static FAR char *unique_chardev(void)
* oriented accessed to the block driver.
*
* Input Parameters:
* filep - The caller provided location in which to return the 'struct
* file' instance.
* blkdev - The path to the block driver
* oflags - Character driver open flags
*
* Returned Value:
* If positive, non-zero file descriptor is returned on success. This
* is the file descriptor of the nameless character driver that mediates
* accesses to the block driver.
*
* Errors that may be returned:
*
* ENOMEM - Failed to create a temporary path name.
*
* Plus:
*
* - Errors reported from bchdev_register()
* - Errors reported from open() or unlink()
* Zero (OK) is returned on success. On failure, a negated errno value is
* returned.
*
****************************************************************************/
@ -202,9 +194,7 @@ int block_proxy(FAR struct file *filep, FAR const char *blkdev, int oflags)
goto errout_with_chardev;
}
/* Free the allocate character driver name and return the open file
* descriptor.
*/
/* Free the allocated character driver name. */
kmm_free(chardev);
return OK;

View File

@ -115,8 +115,7 @@ static int file_vopen(FAR struct file *filep,
/* If the inode is block driver, then we may return a character driver
* proxy for the block driver. block_proxy() will instantiate a BCH
* character driver wrapper around the block driver, open(), then
* unlink() the character driver. On success, block_proxy() will
* return the file descriptor of the opened character driver.
* unlink() the character driver.
*
* NOTE: This will recurse to open the character driver proxy.
*/
@ -128,7 +127,7 @@ static int file_vopen(FAR struct file *filep,
inode_release(inode);
RELEASE_SEARCH(&desc);
/* Get the file descriptor of the opened character driver proxy */
/* Get the file structure of the opened character driver proxy */
return block_proxy(filep, path, oflags);
}