Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Side by Side Diff: fusl/src/stdio/remove.c

Issue 1714623002: [fusl] clang-format fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: headers too Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #include <stdio.h> 1 #include <stdio.h>
2 #include <errno.h> 2 #include <errno.h>
3 #include <fcntl.h> 3 #include <fcntl.h>
4 #include "syscall.h" 4 #include "syscall.h"
5 5
6 int remove(const char *path) 6 int remove(const char* path) {
7 {
8 #ifdef SYS_unlink 7 #ifdef SYS_unlink
9 » int r = __syscall(SYS_unlink, path); 8 int r = __syscall(SYS_unlink, path);
10 #else 9 #else
11 » int r = __syscall(SYS_unlinkat, AT_FDCWD, path, 0); 10 int r = __syscall(SYS_unlinkat, AT_FDCWD, path, 0);
12 #endif 11 #endif
13 #ifdef SYS_rmdir 12 #ifdef SYS_rmdir
14 » if (r==-EISDIR) r = __syscall(SYS_rmdir, path); 13 if (r == -EISDIR)
14 r = __syscall(SYS_rmdir, path);
15 #else 15 #else
16 » if (r==-EISDIR) r = __syscall(SYS_unlinkat, AT_FDCWD, path, AT_REMOVEDIR ); 16 if (r == -EISDIR)
17 r = __syscall(SYS_unlinkat, AT_FDCWD, path, AT_REMOVEDIR);
17 #endif 18 #endif
18 » return __syscall_ret(r); 19 return __syscall_ret(r);
19 } 20 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698