On Sat, Aug 20, 2016 at 11:42:22AM -0700, ashish mittal wrote: > I'm trying to understand how I can parse a json command line having > multiple server list (InetSocketAddressList) without the QemuOpts -> > QDict -> QAPI conversion that I am currently doing. > > block/nbd.c has been suggested, but it only parses a single host > entry, which is pretty straightforward, but not very helpful. > > Could somebody please suggest a sample implementation (other than > gluster.c) that parses a list of server like options in the json > format?
Another block driver that takes an array of objects is block/quorum.c. See quorum_open() and how it picks out "children." objects. I haven't read the full discussion in this thread but maybe that's what you're looking for. Stefan
signature.asc
Description: PGP signature