Sigrid Solveig Haflínudóttiradd dirfd, fstatat, unlinkc42b5355 years agoHistory
22 lines · 324 B · C
RawDownload
#include <unistd.h>#include <errno.h> #undef stat intfstatat(int dirfd, char *path, struct npe_stat *buf, int flags){	char *s, p[8192];	int r; 	USED(flags); 	if(fd2path(dirfd, p, sizeof(p)-1) != 0)		return -1;	if((s = smprint("%s/%s", p, path)) == nil)		return -1;	r = npe_stat(s, buf);	free(s); 	return r;}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t