Merge branch 'main' of ssh://github.com/86Box/probing-tools into main

This commit is contained in:
RichardG867
2023-02-14 12:07:09 -03:00
2 changed files with 8 additions and 7 deletions

View File

@@ -15,13 +15,13 @@ jobs:
steps:
- name: Install build tools
run: sudo apt update && sudo apt install build-essential
run: sudo apt update && sudo apt install build-essential xz-utils
- name: Download OpenWatcom
if: steps.cache.outputs.cache-hit != 'true'
run: |
rm -rf /opt/watcom
mkdir /opt/watcom
wget -qO- https://github.com/open-watcom/open-watcom-v2/releases/download/Current-build/ow-snapshot.tar.gz | tar -xvz -C /opt/watcom
wget -qO- https://github.com/open-watcom/open-watcom-v2/releases/download/Current-build/ow-snapshot.tar.xz | tar -Jxv -C /opt/watcom
echo "/opt/watcom/binl64:/opt/watcom/binl" >> $GITHUB_PATH
- uses: actions/checkout@v2
- name: Build `cp437`
@@ -100,4 +100,4 @@ jobs:
**/*.COM
amikey/*.md
multikey/*.md
viakey/*.md
viakey/*.md

View File

@@ -19,6 +19,7 @@
#include "clib.h"
/* Dummy comment. */
static int
dump_range(uint32_t base, uint32_t size, const char *id)
{
@@ -26,7 +27,7 @@ dump_range(uint32_t base, uint32_t size, const char *id)
FILE *f;
/* Output the range being dumped. */
printf("Dumping %s BIOS range (%08X-%08X)...", id, base, base + size - 1);
printf("Dumping %s BIOS range (%08X-%08X)... ", id, base, base + size - 1);
/* Generate file name. */
sprintf(fn, "%08X.DMP", base);
@@ -34,20 +35,20 @@ dump_range(uint32_t base, uint32_t size, const char *id)
/* Open the dump file. */
f = fopen(fn, "wb");
if (!f) {
printf(" FAILURE\n");
printf("FAILURE\n");
return 1;
}
/* Write the dump. */
if (fwrite((char *) base, 1, size, f) != size) {
printf(" FAILURE\n");
printf("FAILURE\n");
fclose(f);
return 2;
}
/* Finish the dump. */
fclose(f);
printf(" OK\n");
printf("OK\n");
return 0;
}