test40.c File Reference

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

Include dependency graph for test40.c:

Go to the source code of this file.

Defines

#define MAX_ERROR   4
#define ITERATIONS   2
#define System(cmd)   if (system(cmd) != 0) printf("``%s'' failed\n", cmd)
#define Chdir(dir)   if (chdir(dir) != 0) printf("Can't goto %s\n", dir)
#define Stat(a, b)   if (stat(a,b) != 0) printf("Can't stat %s\n", a)

Functions

 _PROTOTYPE (void main,(int argc, char *argv[]))
 _PROTOTYPE (void test40a,(void))
 _PROTOTYPE (int stateq,(struct stat *stp1, struct stat *stp2))
 _PROTOTYPE (void e,(int __n))
void main (int argc, argv)
void test40a ()
void test40b ()
void test40c ()
int stateq (struct stat *stp1, struct stat *stp2)
void makelongnames ()
void e (int n)
void quit ()

Variables

int errct = 0
int subtest = 1
int superuser
char MaxName [NAME_MAX+1]
char MaxPath [PATH_MAX]
char ToLongName [NAME_MAX+2]
char ToLongPath [PATH_MAX+1]


Define Documentation

#define Chdir dir   )     if (chdir(dir) != 0) printf("Can't goto %s\n", dir)
 

Definition at line 32 of file test40.c.

#define ITERATIONS   2
 

Definition at line 29 of file test40.c.

#define MAX_ERROR   4
 

Definition at line 28 of file test40.c.

#define Stat a,
b   )     if (stat(a,b) != 0) printf("Can't stat %s\n", a)
 

Definition at line 33 of file test40.c.

#define System cmd   )     if (system(cmd) != 0) printf("``%s'' failed\n", cmd)
 

Definition at line 31 of file test40.c.


Function Documentation

_PROTOTYPE void  e,
(int __n) 
 

_PROTOTYPE int  stateq,
(struct stat *stp1, struct stat *stp2) 
 

_PROTOTYPE void  test40a,
(void) 
 

_PROTOTYPE void  main,
(int argc, char *argv[]) 
 

void e int  n  ) 
 

Definition at line 311 of file test40.c.

References chdir, errct, errno, exit(), MAX_ERROR, perror(), printf, subtest, and system().

void main int  argc,
argv 
 

Definition at line 44 of file test40.c.

References atoi, Chdir, fflush(), getuid, i, ITERATIONS, m, makelongnames(), printf, stdout, superuser, sync, System, test40a(), test40b(), and test40c().

void makelongnames  ) 
 

Definition at line 289 of file test40.c.

References i, MaxName, MaxPath, memset(), and PATH_MAX.

void quit  ) 
 

Definition at line 328 of file test40.c.

References chdir, errct, exit(), printf, and system().

int stateq struct stat stp1,
struct stat stp2
 

Definition at line 272 of file test40.c.

void test40a  ) 
 

Definition at line 67 of file test40.c.

References e, link, stat::st_atime, stat::st_ctime, stat::st_gid, stat::st_ino, stat::st_mode, stat::st_mtime, stat::st_nlink, stat::st_size, stat::st_uid, stat, Stat, subtest, System, time, time_t, and unlink.

Referenced by main().

void test40b  ) 
 

Definition at line 119 of file test40.c.

References e, link, sprintf(), st, stat::st_nlink, Stat, subtest, and System.

Referenced by main().

void test40c  ) 
 

Definition at line 179 of file test40.c.

References Chdir, e, EACCES, EEXIST, ENAMETOOLONG, ENOENT, ENOTDIR, EPERM, errno, link, mkdir, rmdir, strlen(), subtest, superuser, System, ToLongPath, and unlink.

Referenced by main().


Variable Documentation

int errct = 0
 

Definition at line 20 of file test40.c.

char MaxName[NAME_MAX+1]
 

Definition at line 23 of file test40.c.

char MaxPath[PATH_MAX]
 

Definition at line 24 of file test40.c.

int subtest = 1
 

Definition at line 21 of file test40.c.

int superuser
 

Definition at line 22 of file test40.c.

char ToLongName[NAME_MAX+2]
 

Definition at line 25 of file test40.c.

char ToLongPath[PATH_MAX+1]
 

Definition at line 26 of file test40.c.


Generated on Fri Apr 14 23:22:26 2006 for minix by  doxygen 1.4.6