Revision 7fd6d9fc block-vmdk.c

b/block-vmdk.c
710 710
        "createType=\"monolithicSparse\"\n"
711 711
        "\n"
712 712
        "# Extent description\n"
713
        "RW %lu SPARSE \"%s\"\n"
713
        "RW %" PRId64 " SPARSE \"%s\"\n"
714 714
        "\n"
715 715
        "# The Disk Data Base \n"
716 716
        "#DDB\n"
717 717
        "\n"
718 718
        "ddb.virtualHWVersion = \"%d\"\n"
719
        "ddb.geometry.cylinders = \"%lu\"\n"
719
        "ddb.geometry.cylinders = \"%" PRId64 "\"\n"
720 720
        "ddb.geometry.heads = \"16\"\n"
721 721
        "ddb.geometry.sectors = \"63\"\n"
722 722
        "ddb.adapterType = \"ide\"\n";
......
792 792
    if ((temp_str = strrchr(real_filename, ':')) != NULL)
793 793
        real_filename = temp_str + 1;
794 794
    snprintf(desc, sizeof(desc), desc_template, (unsigned int)time(NULL),
795
             (unsigned long)total_size, real_filename,
796
             (flags & BLOCK_FLAG_COMPAT6 ? 6 : 4), total_size / (63 * 16));
795
             total_size, real_filename,
796
             (flags & BLOCK_FLAG_COMPAT6 ? 6 : 4),
797
             total_size / (int64_t)(63 * 16));
797 798

  
798 799
    /* write the descriptor */
799 800
    lseek(fd, le64_to_cpu(header.desc_offset) << 9, SEEK_SET);

Also available in: Unified diff