Skip to content

Commit 6d63e8b

Browse files
committed
clang-format syscalls.cpp
1 parent 001f36c commit 6d63e8b

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
@@ -348,7 +348,7 @@ backend_t wasmfs_get_backend_by_path(const char* path) {
348348
static timespec ms_to_timespec(double ms) {
349349
long long seconds = ms / 1000;
350350
timespec ts;
351-
ts.tv_sec = seconds; // seconds
351+
ts.tv_sec = seconds; // seconds
352352
ts.tv_nsec = (ms - (seconds * 1000)) * 1000 * 1000; // nanoseconds
353353
return ts;
354354
}
@@ -357,7 +357,10 @@ static double timespec_to_ms(timespec ts) {
357357
return double(ts.tv_sec) * 1000 + double(ts.tv_nsec) / (1000 * 1000);
358358
}
359359

360-
int __syscall_newfstatat(int dirfd, const char* path, struct stat* buf, int flags) {
360+
int __syscall_newfstatat(int dirfd,
361+
const char* path,
362+
struct stat* buf,
363+
int flags) {
361364
// Only accept valid flags.
362365
if (flags & ~(AT_EMPTY_PATH | AT_NO_AUTOMOUNT | AT_SYMLINK_NOFOLLOW)) {
363366
// TODO: Test this case.
@@ -600,8 +603,9 @@ int __syscall_mknodat(int dirfd, const char* path, mode_t mode, dev_t dev) {
600603
OpenReturnMode::Nothing);
601604
}
602605

603-
static int
604-
doMkdir(path::ParsedParent parsed, mode_t mode, backend_t backend = NullBackend) {
606+
static int doMkdir(path::ParsedParent parsed,
607+
mode_t mode,
608+
backend_t backend = NullBackend) {
605609
if (auto err = parsed.getError()) {
606610
return err;
607611
}
@@ -1077,7 +1081,9 @@ int __syscall_renameat(int olddirfd,
10771081
}
10781082

10791083
// TODO: Test this with non-AT_FDCWD values.
1080-
int __syscall_symlinkat(const char* target, int newdirfd, const char* linkpath) {
1084+
int __syscall_symlinkat(const char* target,
1085+
int newdirfd,
1086+
const char* linkpath) {
10811087
auto parsed = path::parseParent(linkpath, newdirfd);
10821088
if (auto err = parsed.getError()) {
10831089
return err;
@@ -1737,11 +1743,8 @@ int __syscall_fadvise64(int fd, off_t offset, off_t len, int advice) {
17371743
return 0;
17381744
}
17391745

1740-
int __syscall__newselect(int nfds,
1741-
void* readfds_,
1742-
void* writefds_,
1743-
void* exceptfds_,
1744-
void* timeout_) {
1746+
int __syscall__newselect(
1747+
int nfds, void* readfds_, void* writefds_, void* exceptfds_, void* timeout_) {
17451748
// TODO: Implement this syscall. For now, we return an error code,
17461749
// specifically ENOMEM which is valid per the docs:
17471750
// ENOMEM Unable to allocate memory for internal tables

0 commit comments

Comments
 (0)