aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/configfs.c b/configfs.c
index cdfd171..7e820c6 100644
--- a/configfs.c
+++ b/configfs.c
@@ -32,9 +32,11 @@ static ssize_t cfg_avirt_stream_map_show(struct config_item *item, char *page)
static ssize_t cfg_avirt_stream_map_store(struct config_item *item,
const char *page, size_t count)
{
+ char *split;
struct avirt_stream *stream = avirt_stream_from_config_item(item);
- memcpy(stream->map, (char *)page, count);
+ split = strsep((char **)&page, "\n");
+ memcpy(stream->map, (char *)split, count);
return count;
}