Return to tcfs_flags.c CVS log | Up to [local] / src / usr.bin / tcfs |
version 1.5, 2000/06/20 01:29:14 | version 1.6, 2000/06/20 07:58:57 | ||
---|---|---|---|
|
|
||
* Base utility set v0.1 | * Base utility set v0.1 | ||
*/ | */ | ||
#include <stdio.h> | |||
#include <errno.h> | |||
#include <fcntl.h> | |||
#include <sys/types.h> | #include <sys/types.h> | ||
#include <sys/mount.h> | |||
#include <sys/param.h> | |||
#include <sys/stat.h> | |||
#include <sys/wait.h> | |||
#include <ctype.h> | #include <ctype.h> | ||
#include <errno.h> | |||
#include <fcntl.h> | |||
#include <pwd.h> | #include <pwd.h> | ||
#include <stdio.h> | |||
#include <unistd.h> | #include <unistd.h> | ||
#include <sys/param.h> | |||
#include <sys/mount.h> | |||
#include <sys/wait.h> | |||
#include <sys/stat.h> | |||
#include <miscfs/tcfs/tcfs.h> | #include <miscfs/tcfs/tcfs.h> | ||
#include <miscfs/tcfs/tcfs_fileinfo.h> | #include <miscfs/tcfs/tcfs_fileinfo.h> | ||
|
|
||
tcfs_flags r; | tcfs_flags r; | ||
struct stat s; | struct stat s; | ||
if (fstat(fd, &s) < 0) { | if (fstat(fd, &s) < 0) | ||
r.flag = -1; | r.flag = -1; | ||
} else | else | ||
r.flag = s.st_flags; | r.flag = s.st_flags; | ||
return (r); | return (r); |