stat.c File Reference

#include <sys/types.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <time.h>
#include <sys/stat.h>

Include dependency graph for stat.c:

Go to the source code of this file.

Data Structures

struct  field

Defines

#define ALLDEF
#define addr(x)   ((void*) &sbuf.x)
#define size(x)   sizeof(sbuf.x)
#define equal(s, t)   (strcmp(s, t) == 0)
#define PATH_MAX   1024
#define BSD
#define S_IREAD   S_IRUSR
#define S_IWRITE   S_IWUSR
#define S_IEXEC   S_IXUSR
#define lstat   stat

Functions

void printstat (struct stat *sbuf, int nprint)
void printit (struct stat *sb, struct field *f, int n)
void rwx (mode_t mode, char *bit)
void usage (void)
int main (int ac, char **av)

Variables

char * arg0
stat sbuf
int errno
int first_file = 1
field fields []
int do_readlink = 0


Define Documentation

#define addr x   )     ((void*) &sbuf.x)
 

Definition at line 32 of file stat.c.

Referenced by __ivaliduser(), Draw_Words(), dump_sym_tab(), exec_image(), fts_padjust(), garbage(), get_data(), get_message(), gethostent(), getifaddrs(), icmp_router_advertisement(), irdp_incoming(), main(), make_bootable(), paramvalue(), parse_line(), Process(), qp_query(), sbm_mget(), servxcheck(), stack_trace(), test6a(), and w_transfer().

#define ALLDEF
 

Definition at line 21 of file stat.c.

#define BSD
 

Definition at line 42 of file stat.c.

#define equal s,
t   )     (strcmp(s, t) == 0)
 

Definition at line 34 of file stat.c.

#define lstat   stat
 

Definition at line 56 of file stat.c.

#define PATH_MAX   1024
 

Definition at line 36 of file stat.c.

#define S_IEXEC   S_IXUSR
 

Definition at line 48 of file stat.c.

#define S_IREAD   S_IRUSR
 

Definition at line 46 of file stat.c.

#define S_IWRITE   S_IWUSR
 

Definition at line 47 of file stat.c.

#define size x   )     sizeof(sbuf.x)
 

Definition at line 33 of file stat.c.

Referenced by addenv(), apply_add(), calc_iovec_size(), calcsize(), calloc(), check_mallinks(), chkdirzone(), command(), complete_bars(), cp_b2u(), display(), distribute(), do_devio(), do_ioctl(), do_new_kmess(), do_segctl(), do_vm_map(), do_vread(), do_vwrite(), doformat(), dotted_num(), dp_check_ints(), dump_file(), dump_stack(), eat_dir(), fat_32_read(), fill(), fill_buffer(), filltable(), fxp_readv(), fxp_writev(), get_mem_chunks(), get_system_type(), getcode(), getPwd(), getsize(), gnu_sort(), gzseek(), hash_remove(), icmp_err_pack(), init_params(), initialize(), install_master(), ip_port_arrive(), list_file(), main(), make_file(), maksub(), memmap_dmp(), minfo(), new_stackptr(), newspell(), ns_interrupt(), OpenFileByDirentry(), OpenRoot(), packet2user(), parse(), police(), pre_allocate_file(), print(), proctab_dmp(), putenv(), qp_query(), queryparam(), rd_wrfile(), Read_Super_Block(), readblock(), realloc(), record_bars_bridge(), record_bars_cardbus(), regcomp(), rehash(), rl_readv(), rl_writev(), select_image(), set_crc(), setup_dma(), sink(), sortsyms(), sr_rwio(), sr_select(), str2size(), sum(), tcp_check_conn(), tcp_release_retrans(), tel_in(), tel_out(), udp_packet2user(), v_at(), w_identify(), and wr_rdfile().


Function Documentation

int main int  ac,
char **  av
 

Definition at line 93 of file stat.c.

References arg0, check, do_readlink, equal, err, files, i, j, NULL, PATH_MAX, and strrchr().

void printit struct stat sb,
struct field f,
int  n
 

Definition at line 290 of file stat.c.

References ctime(), equal, f, fprintf(), int(), long(), printf, rwx(), S_IFBLK, S_IFCHR, S_IFDIR, S_IFLNK, S_IFMT, S_ISGID, S_ISUID, S_ISVTX, sb, stderr, and strcpy().

Referenced by printstat().

void printstat struct stat sbuf,
int  nprint
 

Definition at line 265 of file stat.c.

References fields, fputc(), j, printit(), sbuf, and stdout.

void rwx mode_t  mode,
char *  bit
 

Definition at line 378 of file stat.c.

References S_IEXEC, S_IREAD, and S_IWRITE.

Referenced by permissions(), and printit().

void usage void   ) 
 

Definition at line 784 of file installboot.c.


Variable Documentation

char* arg0
 

Definition at line 51 of file stat.c.

int do_readlink = 0
 

Definition at line 91 of file stat.c.

Referenced by main().

int errno
 

Definition at line 70 of file rcp.c.

struct field fields[]
 

int first_file = 1
 

Definition at line 54 of file stat.c.

struct stat sbuf
 

Definition at line 52 of file stat.c.


Generated on Fri Apr 14 23:07:28 2006 for minix by  doxygen 1.4.6