Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_posix/sys/src/ape/lib/ap/plan9/stat.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include "lib.h"
2
#include <sys/stat.h>
3
#include <errno.h>
4
#include <stdlib.h>
5
#include "sys9.h"
6
#include "dir.h"
7
 
8
int
9
stat(const char *path, struct stat *buf)
10
{
11
	Dir *d;
12
 
13
	if((d = _dirstat(path)) == nil){
14
		_syserrno();
15
		return -1;
16
	}
17
	_dirtostat(buf, d, 0);
18
	free(d);
19
 
20
	return 0;
21
}