lkml.org 
[lkml]   [2016]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 24/46] mtd: nandsim: Wire up NANDSIM_MODE_CACHEFILE ioctl mode
Date
From: Richard Weinberger <richard@nod.at>

Allow the userspace control tool also to setup a cache file.
In contrast to the cache_file module parameter the ioctl() only
accepts a fd. So, userspace should hand in an fd pointing to
a temp file.

Signed-off-by: Richard Weinberger <richard@nod.at>
---
drivers/mtd/nand/nandsim.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index 56a2904..0e8574e 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
@@ -2536,10 +2536,15 @@ static int ns_ctrl_new_instance(struct ns_new_instance_req *req)
case NANDSIM_BACKEND_RAM:
nsparam->bops = &ns_ram_bops;
break;
+
case NANDSIM_BACKEND_FILE:
nsparam->bops = &ns_file_bops;
break;

+ case NANDSIM_BACKEND_CACHEFILE:
+ nsparam->bops = &ns_cachefile_bops;
+ break;
+
default:
kfree(nsparam);
return -EINVAL;
--
2.8.3
\
 
 \ /
  Last update: 2016-09-22 23:58    [W:1.487 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site