Commit 90c161b6 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Nicholas Bellinger

target: use \n as a separator for configuration

The command
| echo rd_pages=32768 > ramdisk/control

Does not work because it writes "rd_pages=32768\n" and the parser which
matches for "rd_pages=%d" does not recognize it due to the \n. One way
of fixing this would be using "echo -n" instead.
This patch adds \n to the list of separators so we don't have to use the
-n argument which I find is more convinient.
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 1880807a
...@@ -1450,7 +1450,7 @@ static ssize_t target_core_dev_pr_store_attr_res_aptpl_metadata( ...@@ -1450,7 +1450,7 @@ static ssize_t target_core_dev_pr_store_attr_res_aptpl_metadata(
return -ENOMEM; return -ENOMEM;
orig = opts; orig = opts;
while ((ptr = strsep(&opts, ",")) != NULL) { while ((ptr = strsep(&opts, ",\n")) != NULL) {
if (!*ptr) if (!*ptr)
continue; continue;
......
...@@ -497,7 +497,7 @@ static ssize_t fd_set_configfs_dev_params( ...@@ -497,7 +497,7 @@ static ssize_t fd_set_configfs_dev_params(
orig = opts; orig = opts;
while ((ptr = strsep(&opts, ",")) != NULL) { while ((ptr = strsep(&opts, ",\n")) != NULL) {
if (!*ptr) if (!*ptr)
continue; continue;
......
...@@ -390,7 +390,7 @@ static ssize_t iblock_set_configfs_dev_params(struct se_hba *hba, ...@@ -390,7 +390,7 @@ static ssize_t iblock_set_configfs_dev_params(struct se_hba *hba,
orig = opts; orig = opts;
while ((ptr = strsep(&opts, ",")) != NULL) { while ((ptr = strsep(&opts, ",\n")) != NULL) {
if (!*ptr) if (!*ptr)
continue; continue;
......
...@@ -817,7 +817,7 @@ static ssize_t pscsi_set_configfs_dev_params(struct se_hba *hba, ...@@ -817,7 +817,7 @@ static ssize_t pscsi_set_configfs_dev_params(struct se_hba *hba,
orig = opts; orig = opts;
while ((ptr = strsep(&opts, ",")) != NULL) { while ((ptr = strsep(&opts, ",\n")) != NULL) {
if (!*ptr) if (!*ptr)
continue; continue;
......
...@@ -472,7 +472,7 @@ static ssize_t rd_set_configfs_dev_params( ...@@ -472,7 +472,7 @@ static ssize_t rd_set_configfs_dev_params(
orig = opts; orig = opts;
while ((ptr = strsep(&opts, ",")) != NULL) { while ((ptr = strsep(&opts, ",\n")) != NULL) {
if (!*ptr) if (!*ptr)
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment