src/commands/simple/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>

Go to the source code of this file.

Classes

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
struct stat sbuf
int errno
int first_file = 1
struct field fields []
int do_readlink = 0


Define Documentation

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

Definition at line 32 of file stat.c.

#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.


Function Documentation

int main ( int  ac,
char **  av 
)

Definition at line 93 of file stat.c.

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

Definition at line 290 of file stat.c.

void printstat ( struct stat sbuf,
int  nprint 
)

Definition at line 265 of file stat.c.

void rwx ( mode_t  mode,
char *  bit 
)

Definition at line 378 of file stat.c.

void usage ( void   ) 

Definition at line 785 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.

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 Tue Mar 9 04:36:43 2010 for Minix by  doxygen 1.5.8