FreeBSD/lib/libstand/dosfs.c
/*
 * Return some stat information on a file.
 */
Return some stat information on a file.
Return some stat information on a file .
static int
dos_stat(struct open_file *fd, struct stat *sb)
{
    DOS_FILE *f = (DOS_FILE *)fd->f_fsdata;
    sb->st_mode = f->de.attr & FA_DIR ? S_IFDIR | 0555 : S_IFREG | 0444;
    sb->st_nlink = 1;
    sb->st_uid = 0;
    sb->st_gid = 0;
    if ((sb->st_size = fsize(f->fs, &f->de)) == -1)
	return EINVAL;
    return (0);
}
static int dos_stat ( struct open_file * fd , struct stat * sb ) { DOS_FILE * f = ( DOS_FILE * ) fd -> f_fsdata ; sb -> st_mode = f -> de . attr & FA_DIR ? S_IFDIR | 0555 : S_IFREG | 0444 ; sb -> st_nlink = 1 ; sb -> st_uid = 0 ; sb -> st_gid = 0 ; if ( ( sb -> st_size = fsize ( f -> fs , & f -> de ) ) == -1 ) return EINVAL ; return ( 0 ) ; }
Return some stat information on a file.
Return some stat information on a file .
/* only important stuff */