Re: [PATCH 1/2] Fix bs_rbd.c slurp_to_semi() not consuming terminating semicolon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Apologies.  I will review today.

On 01/23/2014 09:13 PM, FUJITA Tomonori wrote:
CC'ed to Dan, the author of rbd support.

On Wed, 22 Jan 2014 15:14:18 +1300
Thomas Matysik <thomas@xxxxxxxxxxxx> wrote:

slurp_to_semi() would not consume the terminating semicolon on a
option specified in --bsopts, so any options other than the first
would be ignored as invalid.

Signed-off-by: Thomas Matysik <thomas@xxxxxxxxxxxx>
---
  usr/bs_rbd.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/usr/bs_rbd.c b/usr/bs_rbd.c
index 3ea9d36..f797fd5 100644
--- a/usr/bs_rbd.c
+++ b/usr/bs_rbd.c
@@ -480,6 +480,9 @@ static char *slurp_to_semi(char **p)
  	strncpy(ret, *p, len);
  	ret[len] = '\0';
  	*p = end;
+	// Jump past the semicolon, if we stopped at one
+	if (**p == ';')
+		*p = end + 1;
  	return ret;
  }

--
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux