FreeBSD/sys/compat/cloudabi/cloudabi_file.c
/* Converts a FreeBSD stat structure to a CloudABI stat structure. */
Converts a FreeBSD stat structure to a CloudABI stat structure.
Converts a FreeBSD stat structure to a CloudABI stat structure .
static void
convert_stat(const struct stat *sb, cloudabi_filestat_t *csb)
{
	cloudabi_filestat_t res = {
		.st_dev		= sb->st_dev,
		.st_ino		= sb->st_ino,
		.st_nlink	= sb->st_nlink,
		.st_size	= sb->st_size,
	};
	cloudabi_convert_timespec(&sb->st_atim, &res.st_atim);
	cloudabi_convert_timespec(&sb->st_mtim, &res.st_mtim);
	cloudabi_convert_timespec(&sb->st_ctim, &res.st_ctim);
	*csb = res;
}
static void convert_stat ( const struct stat * sb , cloudabi_filestat_t * csb ) { cloudabi_filestat_t res = { . st_dev = sb -> st_dev , . st_ino = sb -> st_ino , . st_nlink = sb -> st_nlink , . st_size = sb -> st_size , } ; cloudabi_convert_timespec ( & sb -> st_atim , & res . st_atim ) ; cloudabi_convert_timespec ( & sb -> st_mtim , & res . st_mtim ) ; cloudabi_convert_timespec ( & sb -> st_ctim , & res . st_ctim ) ; * csb = res ; }
Converts a FreeBSD stat structure to a CloudABI stat structure.
Converts a FreeBSD stat structure to a CloudABI stat structure .