From: Alan Cox Date: Sun, 25 Nov 2018 18:40:10 +0000 (+0000) Subject: swap: Fix ports using swapmap_add where swapmap_init should be used X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=856a93158610a31998c05abac2a3095ef66e2f30;p=FUZIX.git swap: Fix ports using swapmap_add where swapmap_init should be used Fixes 'free' command reporting --- diff --git a/Kernel/platform-msx1/discard.c b/Kernel/platform-msx1/discard.c index 54f6e5ae..c0ad3ecf 100644 --- a/Kernel/platform-msx1/discard.c +++ b/Kernel/platform-msx1/discard.c @@ -95,5 +95,5 @@ void platform_swap_found(uint8_t letter, uint8_t m) if (n > MAX_SWAPS) n = MAX_SWAPS; while(n) - swapmap_add(n--); + swapmap_init(n--); } diff --git a/Kernel/platform-nascom/devgm833.c b/Kernel/platform-nascom/devgm833.c index cdd3683e..394224c2 100644 --- a/Kernel/platform-nascom/devgm833.c +++ b/Kernel/platform-nascom/devgm833.c @@ -138,7 +138,7 @@ void gm833_init(void) /* Add swap */ openshift = i >= 2 ? 2 : 1; for (i = 0; i < openshift * 8 ; i++) - swapmap_add(i); + swapmap_init(i); } kprintf("gm833: %dK found", num_gm833 * 512); kprintf(", %dK allocated for swap.\n", openshift * 512); diff --git a/Kernel/platform-nascom/discard.c b/Kernel/platform-nascom/discard.c index b7d58c5c..afe0988b 100644 --- a/Kernel/platform-nascom/discard.c +++ b/Kernel/platform-nascom/discard.c @@ -56,5 +56,5 @@ void platform_swap_found(uint8_t letter, uint8_t m) if (n > MAX_SWAPS) n = MAX_SWAPS; while (n) - swapmap_add(n--); + swapmap_init(n--); } diff --git a/Kernel/platform-rc2014-tiny/discard.c b/Kernel/platform-rc2014-tiny/discard.c index 5766275b..2a91275c 100644 --- a/Kernel/platform-rc2014-tiny/discard.c +++ b/Kernel/platform-rc2014-tiny/discard.c @@ -29,7 +29,7 @@ void platform_swap_found(uint8_t letter, uint8_t m) if (n > MAX_SWAPS) n = MAX_SWAPS; while(n) - swapmap_add(n--); + swapmap_init(n--); } void device_init(void) diff --git a/Kernel/platform-rc2014/discard.c b/Kernel/platform-rc2014/discard.c index 74a92be9..c4016dea 100644 --- a/Kernel/platform-rc2014/discard.c +++ b/Kernel/platform-rc2014/discard.c @@ -70,7 +70,7 @@ void platform_swap_found(uint8_t letter, uint8_t m) n = MAX_SWAPS; #ifdef SWAPDEV while (n) - swapmap_add(n--); + swapmap_init(n--); #endif } diff --git a/Kernel/platform-sbcv2/discard.c b/Kernel/platform-sbcv2/discard.c index 127dcf5b..84ee59ef 100644 --- a/Kernel/platform-sbcv2/discard.c +++ b/Kernel/platform-sbcv2/discard.c @@ -78,7 +78,7 @@ void platform_swap_found(uint8_t letter, uint8_t m) if (n > MAX_SWAPS) n = MAX_SWAPS; while(n) - swapmap_add(n--); + swapmap_init(n--); } /*