Skip to content

Commit 92e838c

Browse files
committed
clang-format syscalls.cpp
1 parent 49e81d1 commit 92e838c

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

system/lib/wasmfs/syscalls.cpp

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -347,12 +347,15 @@ backend_t wasmfs_get_backend_by_path(const char* path) {
347347
static timespec ms_to_timespec(double ms) {
348348
long long seconds = ms / 1000;
349349
timespec ts;
350-
ts.tv_sec = seconds; // seconds
350+
ts.tv_sec = seconds; // seconds
351351
ts.tv_nsec = (ms - (seconds * 1000)) * 1000 * 1000; // nanoseconds
352352
return ts;
353353
}
354354

355-
int __syscall_newfstatat(int dirfd, const char* path, struct stat* buf, int flags) {
355+
int __syscall_newfstatat(int dirfd,
356+
const char* path,
357+
struct stat* buf,
358+
int flags) {
356359
// Only accept valid flags.
357360
if (flags & ~(AT_EMPTY_PATH | AT_NO_AUTOMOUNT | AT_SYMLINK_NOFOLLOW)) {
358361
// TODO: Test this case.
@@ -595,8 +598,9 @@ int __syscall_mknodat(int dirfd, const char* path, mode_t mode, dev_t dev) {
595598
OpenReturnMode::Nothing);
596599
}
597600

598-
static int
599-
doMkdir(path::ParsedParent parsed, mode_t mode, backend_t backend = NullBackend) {
601+
static int doMkdir(path::ParsedParent parsed,
602+
mode_t mode,
603+
backend_t backend = NullBackend) {
600604
if (auto err = parsed.getError()) {
601605
return err;
602606
}
@@ -1069,7 +1073,9 @@ int __syscall_renameat(int olddirfd,
10691073
}
10701074

10711075
// TODO: Test this with non-AT_FDCWD values.
1072-
int __syscall_symlinkat(const char* target, int newdirfd, const char* linkpath) {
1076+
int __syscall_symlinkat(const char* target,
1077+
int newdirfd,
1078+
const char* linkpath) {
10731079
auto parsed = path::parseParent(linkpath, newdirfd);
10741080
if (auto err = parsed.getError()) {
10751081
return err;
@@ -1746,11 +1752,8 @@ int __syscall_fadvise64(int fd, off_t offset, off_t len, int advice) {
17461752
return 0;
17471753
}
17481754

1749-
int __syscall__newselect(int nfds,
1750-
void* readfds_,
1751-
void* writefds_,
1752-
void* exceptfds_,
1753-
void* timeout_) {
1755+
int __syscall__newselect(
1756+
int nfds, void* readfds_, void* writefds_, void* exceptfds_, void* timeout_) {
17541757
// TODO: Implement this syscall. For now, we return an error code,
17551758
// specifically ENOMEM which is valid per the docs:
17561759
// ENOMEM Unable to allocate memory for internal tables

0 commit comments

Comments
 (0)