[Top][All Lists]
[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
>
- [Qemu-devel] [PATCH 0/4] More RBD updates, Sage Weil, 2011/09/15
- [Qemu-devel] [PATCH 3/4] rbd: update comment heading, Sage Weil, 2011/09/15
- [Qemu-devel] [PATCH 4/4] rbd: call flush, if available, Sage Weil, 2011/09/15
- [Qemu-devel] [PATCH 1/4] rbd: ignore failures when reading from default conf location, Sage Weil, 2011/09/15
- [Qemu-devel] [PATCH 2/4] rbd: allow escaping in config string, Sage Weil, 2011/09/15
- Re: [Qemu-devel] [PATCH 0/4] More RBD updates, Kevin Wolf, 2011/09/19