From aa637f58c03edfb2d9375b9458da8e457c2002a0 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Thu, 17 Mar 2022 07:28:11 -0700 Subject: [PATCH] DISK: Properly support attach time disk copy to a larger container --- sim_disk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sim_disk.c b/sim_disk.c index bd7ebfdf..cc51d872 100644 --- a/sim_disk.c +++ b/sim_disk.c @@ -2526,6 +2526,7 @@ if (sim_switches & SWMASK ('C')) { /* create new disk conta source_capac = uptr->capac; sim_messagef (SCPE_OK, "%s: Creating new %s '%s' disk container copied from '%s'\n", sim_uname (uptr), dest_fmt, gbuf, cptr); capac_factor = ((dptr->dwidth / dptr->aincr) >= 32) ? 8 : ((dptr->dwidth / dptr->aincr) == 16) ? 2 : 1; /* capacity units (quadword: 8, word: 2, byte: 1) */ + uptr->capac = target_capac; if (strcmp ("VHD", dest_fmt) == 0) dest = sim_vhd_disk_create (gbuf, ((t_offset)uptr->capac)*capac_factor*((dptr->flags & DEV_SECTORS) ? 512 : 1)); else