Compare commits

..

3 Commits

Author SHA1 Message Date
e6384ae90d
Use the new toolchain location
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-23 11:06:37 +01:00
575752eb23
Update drone config to pull toolchain from a new purpose-built toolchain archive for CI 2022-12-23 11:04:50 +01:00
c39e54b7c6
Make TarStream::read_contents take any pointer as output 2022-12-23 10:51:55 +01:00
3 changed files with 5 additions and 5 deletions

View File

@ -12,9 +12,9 @@ steps:
commands: commands:
- apt update - apt update
- apt install build-essential cmake ninja-build wget nasm -y - apt install build-essential cmake ninja-build wget nasm -y
- wget https://pub.cloudapio.eu/luna/toolchain-linux-arm64.tar.gz --quiet - wget https://pub.cloudapio.eu/luna/toolchains/ci-toolchain-arm64.tar.gz --quiet
- tar xf toolchain-linux-arm64.tar.gz - tar xf ci-toolchain-arm64.tar.gz
- rm toolchain-linux-arm64.tar.gz - rm ci-toolchain-arm64.tar.gz
- tools/rebuild-iso.sh - tools/rebuild-iso.sh
trigger: trigger:

View File

@ -32,7 +32,7 @@ class TarStream
void rewind(); void rewind();
usize read_contents(const Entry& entry, char* buf, usize offset, usize length); usize read_contents(const Entry& entry, void* buf, usize offset, usize length);
Result<OwnedStringView> read_contents_as_string(const Entry& entry, usize offset, usize max); Result<OwnedStringView> read_contents_as_string(const Entry& entry, usize offset, usize max);

View File

@ -87,7 +87,7 @@ Result<TarStream::Entry> TarStream::read_next_entry()
return parse_header(&header); return parse_header(&header);
} }
usize TarStream::read_contents(const Entry& entry, char* buf, usize offset, usize length) usize TarStream::read_contents(const Entry& entry, void* buf, usize offset, usize length)
{ {
if (offset >= entry.size) return 0; if (offset >= entry.size) return 0;
if ((length + offset) > entry.size) length = entry.size - offset; if ((length + offset) > entry.size) length = entry.size - offset;