#include <errno.h>
#include <libgen.h>
#include <limits.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <bstrlib.h>
#include <atalk/adouble.h>
#include <atalk/queue.h>
#include <atalk/unix.h>
#include <atalk/util.h>
#include <atalk/vfs.h>
#include <atalk/volume.h>
#include "nad.h"
#include "ftw.h"
Macros | |
#define | STRIP_TRAILING_SLASH(p) |
#define | PHYSPAGES_THRESHOLD (32*1024) |
#define | BUFSIZE_MAX (2*1024*1024) |
#define | MAXPHYS (64 * 1024) |
#define | BUFSIZE_SMALL (MAXPHYS) |
#define | YESNO "(y/n [n]) " |
Enumerations | |
enum | op { FILE_TO_FILE , FILE_TO_DIR , DIR_TO_DNE } |
Functions | |
static int | copy (const char *fpath, const struct stat *sb, int tflag, struct FTW *ftwbuf) |
static int | ftw_copy_file (const struct FTW *, const char *, const struct stat *, int) |
static int | ftw_copy_link (const struct FTW *, const char *, const struct stat *, int) |
static int | setfile (const struct stat *, int) |
static void | upfunc (void) |
static void | sig_handler (int signo _U_) |
static void | set_signal (void) |
static void | usage_cp (void) |
int | ad_cp (int argc, char *argv[], AFPObj *obj) |
static int | ftw_copy_file (const struct FTW *entp _U_, const char *spath, const struct stat *sp, int dne) |
static int | ftw_copy_link (const struct FTW *p _U_, const char *spath, const struct stat *sstp, int exists) |
Variables | |
static char | emptystring [] = "" |
PATH_T | to = { to.p_path, emptystring, "" } |
int | fflag |
int | iflag |
int | nflag |
int | pflag |
int | vflag |
mode_t | mask |
cnid_t | ppdid |
cnid_t | pdid |
cnid_t | did |
static afpvol_t | svolume |
static afpvol_t | dvolume |
static enum op | type |
static int | Rflag |
static volatile sig_atomic_t | alarmed |
static int | badcp |
static int | rval |
static int | ftw_options = FTW_MOUNT | FTW_PHYS | FTW_ACTIONRETVAL |
#define BUFSIZE_MAX (2*1024*1024) |
#define BUFSIZE_SMALL (MAXPHYS) |
#define MAXPHYS (64 * 1024) |
#define PHYSPAGES_THRESHOLD (32*1024) |
#define STRIP_TRAILING_SLASH | ( | p | ) |
#define YESNO "(y/n [n]) " |
enum op |
int ad_cp | ( | int | argc, |
char * | argv[], | ||
AFPObj * | obj ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
cnid_t did |
|
static |
|
static |
int fflag |
|
static |
int iflag |
mode_t mask |
int nflag |
cnid_t pdid |
int pflag |
cnid_t ppdid |
|
static |
|
static |
|
static |
PATH_T to = { to.p_path, emptystring, "" } |
|
static |
int vflag |