diff --git a/fs/driver/driver.h b/fs/driver/driver.h index 990702db01..e3b4c109d1 100644 --- a/fs/driver/driver.h +++ b/fs/driver/driver.h @@ -130,16 +130,8 @@ int block_proxy(FAR struct file *filep, FAR const char *blkdev, int oflags); * Returned Value: * If zero, non-zero inode pointer is returned on success. This * is the inode pointer of the nameless block driver that mediates - * accesses to the mtd driver. - * - * Errors that may be returned: - * - * ENOMEM - Failed to create a temporary path name. - * - * Plus: - * - * - Errors reported from ftl_initialize() - * - Errors reported from open() or unlink() + * accesses to the mtd driver. A negated errno value is returned on + * any failure. * ****************************************************************************/ diff --git a/fs/driver/fs_blockproxy.c b/fs/driver/fs_blockproxy.c index 2d809e5392..8057427f2a 100644 --- a/fs/driver/fs_blockproxy.c +++ b/fs/driver/fs_blockproxy.c @@ -186,10 +186,9 @@ int block_proxy(FAR struct file *filep, FAR const char *blkdev, int oflags) * a problem here!) */ - ret = unlink(chardev); + ret = nx_unlink(chardev); if (ret < 0) { - ret = -errno; ferr("ERROR: Failed to unlink %s: %d\n", chardev, ret); goto errout_with_chardev; } @@ -200,7 +199,7 @@ int block_proxy(FAR struct file *filep, FAR const char *blkdev, int oflags) return OK; errout_with_bchdev: - unlink(chardev); + nx_unlink(chardev); errout_with_chardev: kmm_free(chardev); diff --git a/fs/driver/fs_mtdproxy.c b/fs/driver/fs_mtdproxy.c index 9c65c500c1..1307a72c66 100644 --- a/fs/driver/fs_mtdproxy.c +++ b/fs/driver/fs_mtdproxy.c @@ -131,16 +131,8 @@ static FAR char *unique_blkdev(void) * Returned Value: * If zero, non-zero inode pointer is returned on success. This * is the inode pointer of the nameless block driver that mediates - * accesses to the mtd driver. - * - * Errors that may be returned: - * - * ENOMEM - Failed to create a temporary path name. - * - * Plus: - * - * - Errors reported from ftl_initialize() - * - Errors reported from open() or unlink() + * accesses to the mtd driver. A negated errno value is returned on + * any failure. * ****************************************************************************/ @@ -193,7 +185,7 @@ int mtd_proxy(FAR const char *mtddev, int mountflags, */ out_with_fltdev: - unlink(blkdev); + nx_unlink(blkdev); out_with_blkdev: kmm_free(blkdev); return ret;