Revision 9ce56db6 vl.c

b/vl.c
2300 2300
                    exit(1);
2301 2301
                }
2302 2302

  
2303
                len = strlen(",id=,path=");
2303
                if (qemu_opt_get(opts, "fstype") == NULL ||
2304
                        qemu_opt_get(opts, "mount_tag") == NULL ||
2305
                        qemu_opt_get(opts, "path") == NULL ||
2306
                        qemu_opt_get(opts, "security_model") == NULL) {
2307
                    fprintf(stderr, "Usage: -virtfs fstype,path=/share_path/,"
2308
                            "security_model=[mapped|passthrough],"
2309
                            "mnt_tag=tag.\n");
2310
                    exit(1);
2311
                }
2312

  
2313
                len = strlen(",id=,path=,security_model=");
2304 2314
                len += strlen(qemu_opt_get(opts, "fstype"));
2305 2315
                len += strlen(qemu_opt_get(opts, "mount_tag"));
2306 2316
                len += strlen(qemu_opt_get(opts, "path"));
2317
                len += strlen(qemu_opt_get(opts, "security_model"));
2307 2318
                arg_fsdev = qemu_malloc((len + 1) * sizeof(*arg_fsdev));
2308 2319

  
2309 2320
                if (!arg_fsdev) {
......
2312 2323
                    exit(1);
2313 2324
                }
2314 2325

  
2315
                sprintf(arg_fsdev, "%s,id=%s,path=%s",
2326
                sprintf(arg_fsdev, "%s,id=%s,path=%s,security_model=%s",
2316 2327
                                qemu_opt_get(opts, "fstype"),
2317 2328
                                qemu_opt_get(opts, "mount_tag"),
2318
                                qemu_opt_get(opts, "path"));
2329
                                qemu_opt_get(opts, "path"),
2330
                                qemu_opt_get(opts, "security_model"));
2319 2331

  
2320 2332
                len = strlen("virtio-9p-pci,fsdev=,mount_tag=");
2321 2333
                len += 2*strlen(qemu_opt_get(opts, "mount_tag"));

Also available in: Unified diff