2015-12-22 12:55:44 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the UCB release of Plan 9. It is subject to the license
|
|
|
|
* terms in the LICENSE file found in the top-level directory of this
|
|
|
|
* distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
|
|
|
|
* part of the UCB release of Plan 9, including this file, may be copied,
|
|
|
|
* modified, propagated, or distributed except according to the terms contained
|
|
|
|
* in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <u.h>
|
|
|
|
#include <libc.h>
|
2016-12-01 00:09:42 +01:00
|
|
|
#include <9P2000.h>
|
2015-12-22 12:55:44 +01:00
|
|
|
|
|
|
|
int
|
2017-04-19 23:33:14 +02:00
|
|
|
jehanne_dirfwstat(int fd, Dir *d)
|
2015-12-22 12:55:44 +01:00
|
|
|
{
|
|
|
|
uint8_t *buf;
|
|
|
|
int r;
|
|
|
|
|
2017-04-19 23:33:14 +02:00
|
|
|
r = jehanne_sizeD2M(d);
|
|
|
|
buf = jehanne_malloc(r);
|
2015-12-22 12:55:44 +01:00
|
|
|
if(buf == nil)
|
|
|
|
return -1;
|
2017-04-19 23:33:14 +02:00
|
|
|
jehanne_convD2M(d, buf, r);
|
2019-11-26 02:25:23 +01:00
|
|
|
r = sys_fwstat(fd, buf, r);
|
2017-04-19 23:33:14 +02:00
|
|
|
jehanne_free(buf);
|
2015-12-22 12:55:44 +01:00
|
|
|
return r;
|
|
|
|
}
|