Exemplo n.º 1
0
int
build_platform_open(const char *pathname, int oflags, my_mode_t mode)
{
	int fd = open(pathname, to_platform_open_mode(oflags),
		to_platform_mode(mode));
	if (fd < 0) {
		errno = from_platform_error(errno);
		return -1;
	}

	return fd;
}
Exemplo n.º 2
0
void
to_platform_stat(const struct my_stat *myst, struct stat *st)
{
	st->st_dev = myst->dev;
	st->st_ino = myst->ino;
	st->st_mode = to_platform_mode(myst->mode);
	st->st_nlink = myst->nlink;
	st->st_uid = myst->uid;
	st->st_gid = myst->gid;
	st->st_size = myst->size;
	st->st_blksize = myst->blksize;
	st->st_atime = myst->atime;
	st->st_mtime = myst->mtime;
	st->st_ctime = myst->ctime;
//	st->st_crtime = myst->crtime;
}
Exemplo n.º 3
0
void
to_platform_stat(const struct fssh_stat *fsshStat, struct stat *st)
{
	st->st_dev = fsshStat->fssh_st_dev;
	st->st_ino = fsshStat->fssh_st_ino;
	st->st_mode = to_platform_mode(fsshStat->fssh_st_mode);
	st->st_nlink = fsshStat->fssh_st_nlink;
	st->st_uid = fsshStat->fssh_st_uid;
	st->st_gid = fsshStat->fssh_st_gid;
	st->st_size = fsshStat->fssh_st_size;
	st->st_blksize = fsshStat->fssh_st_blksize;
	st->st_atime = fsshStat->fssh_st_atime;
	st->st_mtime = fsshStat->fssh_st_mtime;
	st->st_ctime = fsshStat->fssh_st_ctime;
//	st->st_crtime = fsshStat->fssh_st_crtime;
//	st->st_type = fsshStat->fssh_st_type;
}