]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
>1T drive size incorrect size display.
authorToni Wilen <twilen@winuae.net>
Sat, 13 Sep 2014 17:21:54 +0000 (20:21 +0300)
committerToni Wilen <twilen@winuae.net>
Sat, 13 Sep 2014 17:21:54 +0000 (20:21 +0300)
filesys.cpp
od-win32/win32gui.cpp

index aa8e8e19f06ac1fe73230f8e3163f1ca783cad84..0dc130c9e5b2a3d27c95dd5308a2c5461ce06043 100644 (file)
@@ -6952,7 +6952,7 @@ static void dump_partinfo (struct hardfiledata *hfd, uae_u8 *pp)
                spt, reserved, lowcyl, highcyl, (uae_u32)(size >> 20));
        write_log (_T("Buffers: %d, BufMemType: %08x, MaxTransfer: %08x, Mask: %08x, BootPri: %d\n"),
                rl (pp + 44), rl (pp + 48), rl (pp + 52), rl (pp + 56), rl (pp + 60));
-       write_log (_T("Total blocks: %d, Total disk blocks: %d\n"), surfaces * spt * (highcyl - lowcyl + 1), hfd->virtsize / blocksize);
+       write_log (_T("Total blocks: %lld, Total disk blocks: %lld\n"), (uae_s64)surfaces * spt * (highcyl - lowcyl + 1), hfd->virtsize / blocksize);
 
        if (hfd->drive_empty) {
                write_log (_T("Empty drive\n"));
index 23f9c67a8c7a9076e6b8fc298a6100d5fb48bf3c..badcc36340cec17b101df1cbc97ac8e48d11072f 100644 (file)
@@ -2779,7 +2779,7 @@ int MultiDiskSelection (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *pr
        int multi = 0;
        return DiskSelection_2 (hDlg, wParam, flag, prefs, path_out, &multi);
 }
-static int loopmulti (TCHAR *s, TCHAR *out)
+static int loopmulti (const TCHAR *s, TCHAR *out)
 {
        static int index;
 
@@ -2802,7 +2802,7 @@ static int loopmulti (TCHAR *s, TCHAR *out)
        return 1;
 }
 
-static BOOL CreateHardFile (HWND hDlg, UINT hfsizem, TCHAR *dostype, TCHAR *newpath, TCHAR *outpath)
+static BOOL CreateHardFile (HWND hDlg, UINT hfsizem, const TCHAR *dostype, TCHAR *newpath, TCHAR *outpath)
 {
        HANDLE hf;
        int i = 0;
@@ -10306,7 +10306,7 @@ static void updatehdfinfo (HWND hDlg, bool force, bool defaults)
 {
        static uae_u64 bsize;
        static uae_u8 id[512];
-       int blocks, cyls, i;
+       uae_u32 blocks, cyls, i;
        TCHAR tmp[200], tmp2[200];
        TCHAR idtmp[17];
 
@@ -10346,7 +10346,7 @@ static void updatehdfinfo (HWND hDlg, bool force, bool defaults)
                                } else {
                                        getchspgeometry (bsize, &current_hfdlg.ci.pcyls, &current_hfdlg.ci.pheads, &current_hfdlg.ci.psecs, false);
                                }
-                       } else if (current_hfdlg.ci.blocksize * current_hfdlg.ci.sectors * current_hfdlg.ci.surfaces) {
+                       } else if (current_hfdlg.ci.blocksize && current_hfdlg.ci.sectors && current_hfdlg.ci.surfaces) {
                                getchsgeometry_hdf (open ? &hfd : NULL, bsize, &current_hfdlg.ci.cyls, &current_hfdlg.ci.surfaces, &current_hfdlg.ci.sectors);
                                current_hfdlg.original = 0;
                        }
@@ -10358,7 +10358,7 @@ static void updatehdfinfo (HWND hDlg, bool force, bool defaults)
        }
 
        cyls = current_hfdlg.forcedcylinders;
-       if (!cyls && current_hfdlg.ci.blocksize * current_hfdlg.ci.sectors * current_hfdlg.ci.surfaces) {
+       if (!cyls && current_hfdlg.ci.blocksize && current_hfdlg.ci.sectors && current_hfdlg.ci.surfaces) {
                cyls = bsize / (current_hfdlg.ci.blocksize * current_hfdlg.ci.sectors * current_hfdlg.ci.surfaces);
        }
        blocks = cyls * (current_hfdlg.ci.sectors * current_hfdlg.ci.surfaces);