| Age | Commit message (Collapse) | Author |
|
|
|
I found that after switching from my custom Guid parser to the one in std that it increased zigwin32 build times substantially (from 40 seconds to over 10 minutes). More information can be found in the benchmark PR I created here: https://github.com/ziglang/gotta-go-fast/pull/21 . This PR ports my GUID parser to std so all projects can leverage the faster comptime performance.
|
|
Also adds the _CSKY and _FRV ELF machines that are defined in
`<linux/elf-em.h>`
|
|
|
|
The size of a GUID is not platform-dependent, it's always a fixed number of bits. So I've updated guid to use fixed bit integer types rather than platform-dependent C integer types.
|
|
|
|
|
|
|
|
Allows handling uefi function errors in a more zig-style way with try
and catch, using `try f().err()` when a `Status` is returned.
|
|
This makes the struct align(4), which allows it to be passed as flags
more easily.
|
|
Beyond adding default zero-initialization, this commit changes undefined
initialization to zero, as some cases reserved the padding and on other
cases, I've found some systems act strange when giving uninit instead of
zero even when it shouldn't be an issue, one example being
FileProtocol.Open's attributes, which *should* be ignored when not
creating a file, but ended up giving an unrelated error.
|
|
|
|
I've seen having this be wrong break some cross-compilers, and it's
also how it is in other files so it's best to be consistent.
It's also just the actual casing of the file.
|
|
Uses comptime loops over the types instead of writing out a large
switch.
|
|
|
|
|
|
|
|
|
|
|
|
`uefi/protocols.zig` and `uefi/tables.zig` just re-exported all the
public symbols, which is basically the purpose of `usingnamespace`
import-wise.
|
|
41fd343508880ffdfbc83c7b053237da09199f02 made a breaking change to the
public API; this commit reverts the API changes but keeps the
improved logic.
|
|
|
|
This allows users to add file paths to device paths, which is often used
in methods like `boot_services.loadImage` and `boot_services.startImage`,
which take a device path with an additional file path appended to locate
the image.
|
|
These are used for more easily dealing with a series of Device Path
nodes.
|
|
|
|
The GUID on FileProtocol was for EFI_FILE_INFO, FileProtocol itself doesn't
have a GUID, there are only those for the requested information types.
|
|
Can happen when e.g. trying to delete a file with the Read Only flag set
|
|
copy_cqes() is not guaranteed to return as many CQEs as provided in the
`wait_nr` argument, meaning the assert in `copy_cqe` can trigger.
Instead, loop until we do get at least one CQE returned.
This mimics the behaviour of liburing's _io_uring_get_cqe.
|
|
The semantics of this function are that it moves both files and
directories. Previously we had this `is_dir` boolean field of
`std.os.windows.OpenFile` which required the API user to choose: are we
opening a file or directory? And the other kind would either cause
error.IsDir or error.NotDir. But that is not a limitation of the Windows
file system API; it was self-imposed.
On Windows, rename is implemented internally with `NtCreateFile` so we
need to allow it to open either files or directories. This is now done
by `std.os.windows.OpenFile` accepting enum{file_only,dir_only,any}
instead of a boolean.
|
|
For renameat, unlinkat, mkdirat, symlinkat and linkat the error code
differs between kernel 5.4 which returns EBADF and kernel 5.10 which returns EINVAL.
Fixes #10466
|
|
zig fmt now replaces c_void with anyopaque to make updating
code easy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Adds the `tcflag_t` type to the termios constants.
This is made to allow bitwise operations on the termios
constants without an integer cast, e.g.:
```zig
var raw = try std.os.tcgetattr(std.os.STDIN_FILENO);
raw.lflag &= std.os.linux.ECHO | std.os.linux.ICANON;
```
instead of
```zig
var raw = try std.os.tcgetattr(std.os.STDIN_FILENO);
raw.lflag &= ~@intCast(u32, std.os.linux.ECHO | std.os.linux.ICANON);
```
Contributes to #10181
|
|
Fix rlimit_resource for MIPS and SPARC
|
|
The old test "timeout_link_chain1" was ported from liburing test_timeout_link_chain1
https://github.com/axboe/liburing/blob/509873c4454012c5810c728695c21911c82acdc4/test/link-timeout.c#L539-L628
However it turns out that both fails with EBADF (-9) on Linux kernel 5.4.
The this new test skips properly on Linux kernel 5.4
and passes on Linux kernel 5.11.
|
|
|
|
|
|
See #3811
|
|
See #10247
|
|
io_uring: adds link_timeout
|
|
based off definitions in https://uefi.org/sites/default/files/resources/UEFI%20Spec%202_6.pdf
|
|
|
|
This test can fail due to a fix in musl for 32 bit MIPS, where musl changes limits greater than -1UL/2 to RLIM_INFINITY.
See http://git.musl-libc.org/cgit/musl/commit/src/misc/getrlimit.c?id=8258014fd1e34e942a549c88c7e022a00445c352
Depending on the system where the test is run getrlimit can return
RLIM_INFINITY for example if RLIMIT_MEMLOCK is bigger than ~2GiB.
If that happens, the setrlimit call will fail with PermissionDenied.
|