diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2010-09-02 21:47:59 +0530 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-09-04 09:52:53 +0000 |
commit | c93031e56a7fe0f22dd4ece50d25d5f3af221cfa (patch) | |
tree | 4f9b2d084c1422ebed5962a6a4f7ea34524ec3a4 /vl.c | |
parent | 1b27d7a1e8609b2eeb6238f2c629eb82217523f6 (diff) | |
download | qemu-c93031e56a7fe0f22dd4ece50d25d5f3af221cfa.tar.gz qemu-c93031e56a7fe0f22dd4ece50d25d5f3af221cfa.tar.bz2 qemu-c93031e56a7fe0f22dd4ece50d25d5f3af221cfa.zip |
virtio-9p: Make sure -virtfs option works correctly
When making copy of arguments we were doing partial copy
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2332,7 +2332,7 @@ int main(int argc, char **argv, char **envp) len += strlen(qemu_opt_get(opts, "security_model")); arg_fsdev = qemu_malloc((len + 1) * sizeof(*arg_fsdev)); - snprintf(arg_fsdev, len * sizeof(*arg_fsdev), + snprintf(arg_fsdev, (len + 1) * sizeof(*arg_fsdev), "%s,id=%s,path=%s,security_model=%s", qemu_opt_get(opts, "fstype"), qemu_opt_get(opts, "mount_tag"), @@ -2343,7 +2343,7 @@ int main(int argc, char **argv, char **envp) len += 2*strlen(qemu_opt_get(opts, "mount_tag")); arg_9p = qemu_malloc((len + 1) * sizeof(*arg_9p)); - snprintf(arg_9p, len * sizeof(*arg_9p), + snprintf(arg_9p, (len + 1) * sizeof(*arg_9p), "virtio-9p-pci,fsdev=%s,mount_tag=%s", qemu_opt_get(opts, "mount_tag"), qemu_opt_get(opts, "mount_tag")); |