~ubuntu-branches/ubuntu/maverick/libvirt/maverick

« back to all changes in this revision

Viewing changes to src/storage_backend_logical.c

Tags: upstream-0.6.4
Import upstream version 0.6.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
594
594
        /* A target path passed to CreateVol has no meaning */
595
595
        VIR_FREE(vol->target.path);
596
596
    }
597
 
    if (VIR_ALLOC_N(vol->target.path, strlen(pool->def->target.path) +
598
 
                    1 + strlen(vol->name) + 1) < 0) {
 
597
 
 
598
    if (virAsprintf(&vol->target.path, "%s/%s",
 
599
                    pool->def->target.path,
 
600
                    vol->name) == -1) {
599
601
        virReportOOMError(conn);
600
602
        return -1;
601
603
    }
602
 
    strcpy(vol->target.path, pool->def->target.path);
603
 
    strcat(vol->target.path, "/");
604
 
    strcat(vol->target.path, vol->name);
605
604
 
606
605
    if (virRun(conn, cmdargv, NULL) < 0)
607
606
        return -1;