qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/4] rbd: allow escaping in config string


From: Sage Weil
Subject: Re: [Qemu-devel] [PATCH 2/4] rbd: allow escaping in config string
Date: Mon, 19 Sep 2011 13:33:53 -0700 (PDT)

On Mon, 19 Sep 2011, Kevin Wolf wrote:
> If src ends with a backslash, you read beyond the end of the string.

Right, sending an updated patch.

> Wouldn't it make sense to have the unescape integrated in
> qemu_rbd_next_tok? Or are there any places where you would want to call
> it without doing a qemu_rbd_unescape() afterwards?

The conf string makes two passes through rbd_next_tok(), once to grab 
the whole conf string, and again to pull out each item.  We can't 
strip out escaping the first time through or else e.g. \: will turn into 
the : delimiter.

I thought about adding a flag to enable/disable the escaping, but 
explicitly doing the unescape seemed cleaner.

sage
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]