#include <sys/types.h>#include <sys/stat.h>#include <errno.h>#include <fcntl.h>#include <utime.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <sys/wait.h>#include <stdio.h>#include <dirent.h>Include dependency graph for backup.c:

Go to the source code of this file.
Data Structures | |
| struct | sorted |
Defines | |
| #define | NAME_SIZE _DIRENT_NAME_LEN |
| #define | COPY_SIZE 4096 |
| #define | MAX_ENTRIES 512 |
| #define | MAX_PATH 256 |
| #define | NONFATAL 0 |
| #define | FATAL 1 |
| #define | NO_SAVINGS 512 |
| #define | OUT_OF_SPACE 2 |
Functions | |
| _PROTOTYPE (int main,(int argc, char **argv)) | |
| _PROTOTYPE (void maketarget,(char *dir2)) | |
| _PROTOTYPE (int make_dir,(char *dir)) | |
| _PROTOTYPE (int stat_all,(char *dir1, int n)) | |
| _PROTOTYPE (void sort_dir,(int m)) | |
| _PROTOTYPE (void process,(int m, char *dir1, char *dir2)) | |
| _PROTOTYPE (void swap,(struct sorted *sp1, struct sorted *sp2)) | |
| _PROTOTYPE (int copy,(char *dir1, struct sorted *sp, char *cbuf2)) | |
| _PROTOTYPE (int zcopy,(char *src, char *targ)) | |
| _PROTOTYPE (void copydir,(char *dir1, char *dir2, char *namep)) | |
| _PROTOTYPE (void newdisk,(char *dir)) | |
| _PROTOTYPE (void usage,(void)) | |
| _PROTOTYPE (void error,(int type, char *s1, char *s2, char *s3)) | |
| int | main (int argc, argv) |
| void | maketarget (char *dir2) |
| int | make_dir (char *dir) |
| int | stat_all (char *dir1, int n) |
| void | sort_dir (int m) |
| void | process (int m, char *dir1, char *dir2) |
| void | swap (struct sorted *sp1, struct sorted *sp2) |
| int | copy (char *dir1, struct sorted *sp, char *cbuf2) |
| int | zcopy (char *src, char *targ) |
| void | copydir (char *dir1, char *dir2, char *namep) |
| void | newdisk (char *dir) |
| void | usage () |
| void | error (int type, char *s1, char *s2, char *s3) |
Variables | |
| dirent | dir_ent [MAX_ENTRIES] |
| int | entries = 0 |
| char | copybuf [COPY_SIZE] |
| char * | pname |
| int | dflag |
| int | jflag |
| int | mflag |
| int | nflag |
| int | oflag |
| int | rflag |
| int | sflag |
| int | tflag |
| int | vflag |
| int | zflag |
| int | errno |
| char ** | environ |
|
|
Definition at line 49 of file backup.c. Referenced by copy(). |
|
|
|
|
|
Definition at line 50 of file backup.c. Referenced by main(). |
|
|
|
|
|
|
|
|
Definition at line 54 of file backup.c. Referenced by zcopy(). |
|
|
Definition at line 52 of file backup.c. Referenced by copy(), error(), process(), and stat_all(). |
|
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||||||
|
Definition at line 344 of file backup.c. References close, COPY_SIZE, copybuf, creat, dflag, EIO, ENFILE, ENOSPC, errno, error, fd1, fd2, jflag, MAX_PATH, msg, n, NAME_SIZE, NONFATAL, O_RDONLY, oflag, open, OUT_OF_SPACE, p, pname, printf, read, rflag, S_IWUSR, sflag, strcmp, strcpy(), strlen(), strncat(), strncmp(), tflag, unlink, utime, vflag, write, zcopy(), and zflag. |
|
||||||||||||||||
|
Definition at line 499 of file backup.c. References environ, error, execle, FATAL, fork, jflag, MAX_PATH, mflag, nflag, oflag, pid, pname, rflag, sflag, snprintf(), status, strcat(), strcpy(), tflag, vflag, wait, and zflag. |
|
||||||||||||||||||||
|
|
|
||||||||||||
|
Definition at line 88 of file backup.c. References c, closedir, cp, dflag, dir_ent, e, entries, error, FATAL, jflag, m, maketarget(), MAX_ENTRIES, memcpy(), mflag, n, nflag, NULL, oflag, opendir, perror(), pname, process(), readdir, rflag, s, S_IFDIR, S_IFMT, sflag, sort_dir(), stat, stat_all(), strcmp, strrchr(), sync, tflag, usage, vflag, and zflag. |
|
|
Definition at line 188 of file backup.c. References close, environ, error, execle, FATAL, fork, pid, status, and wait. Referenced by maketarget(). |
|
|
Definition at line 163 of file backup.c. References access, c, make_dir(), MAX_PATH, p, and strcpy(). |
|
|
Definition at line 545 of file backup.c. References environ, error, execle, FATAL, fork, maketarget(), pid, printf, status, and wait. Referenced by process(). |
|
||||||||||||||||
|
Definition at line 271 of file backup.c. References cbuf, copy, error, FATAL, fmode(), if(), MAX_PATH, mflag, modtime(), NAME_SIZE, newdisk(), NONFATAL, OUT_OF_SPACE, printf, rflag, s, S_IFMT, S_IFREG, snprintf(), sp, stat, strlen(), strncat(), strncmp(), and zflag. |
|
|
Definition at line 255 of file backup.c. References sorted::namep, and strcmp. Referenced by main(). |
|
||||||||||||
|
Definition at line 211 of file backup.c. References cbuf, dirent::d_ino, dirent::d_name, d_name(), dir_ent, error, i, j, MAX_PATH, NAME_SIZE, NONFATAL, s, snprintf(), stat, and strcmp. Referenced by main(). |
|
||||||||||||
|
Definition at line 331 of file backup.c. References d. |
|
|
|
|
||||||||||||
|
Definition at line 463 of file backup.c. References close, environ, error, execle, FATAL, fork, NO_SAVINGS, O_RDWR, open, OUT_OF_SPACE, pid, rflag, s, status, strcat(), strcpy(), and wait. Referenced by copy(). |
|
|
Definition at line 67 of file backup.c. Referenced by copy(). |
|
|
|
|
|
Definition at line 57 of file backup.c. Referenced by main(), map_range(), and stat_all(). |
|
|
Definition at line 58 of file backup.c. Referenced by apply_remove(), icmp_router_advertisement(), main(), traverse(), and unzRepair(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 69 of file backup.c. Referenced by copy(), copydir(), do_chown(), dumpfile(), fts_build(), imhand(), main(), mtrans(), and recvfile(). |
|
|
Definition at line 68 of file backup.c. Referenced by copy(), copydir(), error(), getparamlist(), main(), and usage(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.4.6