# std.os: Allow write functions to return INVAL errors · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/6ab04b59417eb9c7fff81ea26424c2340dc72097)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 6ab04b59417eb9c7fff81ea26424c2340dc72097

Requested commit: 6ab04b59417eb9c7fff81ea26424c2340dc72097

Commit: 6ab04b59417eb9c7fff81ea26424c2340dc72097

Tree: 95a929045abb767ad47351af05778fb1ff0a6d32

Author: jim price

Committer: Andrew Kelley

## Message

```
std.os: Allow write functions to return INVAL errors

In Linux when interacting with the virtual file system when writing
in invalid value to a file the OS will return errno 22 (INVAL).

Instead of triggering an unreachable, this change now returns a
newly introduced error.InvalidArgument.

```

## Parents

- [27701596060c7a8018f9a9add21952a6d7f83d96](https://git.cafe/gitcafe/zig/commit/27701596060c7a8018f9a9add21952a6d7f83d96?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/6ab04b59417eb9c7fff81ea26424c2340dc72097?format=markdown)
