#include <arpa/inet.h>
#include <signal.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <atalk/globals.h>
#include <atalk/cnid.h>
#include <atalk/compat.h>
#include <atalk/volume.h>
Go to the source code of this file.
|
void | _log (enum logtype lt, char *fmt,...) |
int | ad_ls (int argc, char **argv, AFPObj *obj) |
int | ad_cp (int argc, char **argv, AFPObj *obj) |
int | ad_rm (int argc, char **argv, AFPObj *obj) |
int | ad_mv (int argc, char **argv, AFPObj *obj) |
int | ad_set (int argc, char **argv, AFPObj *obj) |
int | ad_find (int argc, char **argv, AFPObj *obj) |
int | openvol (AFPObj *obj, const char *path, afpvol_t *vol) |
void | closevol (afpvol_t *vol) |
cnid_t | cnid_for_paths_parent (const afpvol_t *vol, const char *path, cnid_t *did) |
char * | utompath (const struct vol *, const char *) |
int | convert_dots_encoding (const afpvol_t *svol, const afpvol_t *dvol, char *path) |
◆ ADVOL_V2_OR_EA
#define ADVOL_V2_OR_EA |
( |
| ad | ) |
|
Value:
#define AD_VERSION2
Definition adouble.h:45
#define AD_VERSION_EA
Definition adouble.h:46
◆ DIR_DOT_OR_DOTDOT
#define DIR_DOT_OR_DOTDOT |
( |
| a | ) |
|
Value: ((strcmp(a, ".") == 0) || (strcmp(a, "..") == 0))
◆ ERROR
Value: do { \
_log(
STD, __VA_ARGS__); \
exit(1); \
} while (0)
◆ SLOG
Value:
void _log(enum logtype lt, char *fmt,...)
Definition nad_util.c:79
◆ TIMESPEC_TO_TIMEVAL
#define TIMESPEC_TO_TIMEVAL |
( |
| tv, |
|
|
| ts ) |
Value: { \
(tv)->tv_sec = (ts)->tv_sec; \
(tv)->tv_usec = (ts)->tv_nsec / 1000; \
}
◆ logtype
◆ _log()
void _log |
( |
enum logtype | lt, |
|
|
char * | fmt, |
|
|
| ... ) |
|
extern |
◆ ad_cp()
int ad_cp |
( |
int | argc, |
|
|
char ** | argv, |
|
|
AFPObj * | obj ) |
|
extern |
◆ ad_find()
int ad_find |
( |
int | argc, |
|
|
char ** | argv, |
|
|
AFPObj * | obj ) |
|
extern |
◆ ad_ls()
int ad_ls |
( |
int | argc, |
|
|
char ** | argv, |
|
|
AFPObj * | obj ) |
|
extern |
◆ ad_mv()
int ad_mv |
( |
int | argc, |
|
|
char ** | argv, |
|
|
AFPObj * | obj ) |
|
extern |
◆ ad_rm()
int ad_rm |
( |
int | argc, |
|
|
char ** | argv, |
|
|
AFPObj * | obj ) |
|
extern |
◆ ad_set()
int ad_set |
( |
int | argc, |
|
|
char ** | argv, |
|
|
AFPObj * | obj ) |
|
extern |
◆ closevol()
◆ cnid_for_paths_parent()
Resolves CNID of a given paths parent directory
path might be: (a) relative: "dir/subdir" with cwd: "/afp_volume/topdir" (b) absolute: "/afp_volume/dir/subdir"
path MUST be pointing inside vol, this is usually the case as vol has been build from path using loadvolinfo and friends.
- Parameters
-
vol | (r) pointer to afpvol_t |
path | (r) path, see above |
did | (rw) parent CNID of returned CNID |
- Returns
- CNID of path
◆ convert_dots_encoding()
int convert_dots_encoding |
( |
const afpvol_t * | svol, |
|
|
const afpvol_t * | dvol, |
|
|
char * | path ) |
|
extern |
Convert dot encoding of basename in place
path arg can be "[/][dir/ | ...]filename". It will be converted in place possible encoding ".file" as ":2efile" which means the result will be longer then the original which means provide a big enough buffer.
- Parameters
-
svol | (r) source volume |
dvol | (r) destination volume |
path | (rw) path to convert in place |
- Returns
- 0 on success, -1 on error
◆ openvol()
Load volinfo and initialize struct vol
- Parameters
-
obj | (r) AFPObj of the current connection |
path | (r) path to evaluate |
vol | (rw) structure to initialize |
- Returns
- 0 on success, exits on error
◆ utompath()
char * utompath |
( |
const struct vol * | vol, |
|
|
const char * | upath ) |
|
extern |
◆ fflag
◆ iflag
◆ lflag
◆ log_verbose
◆ nflag
◆ pflag
◆ vflag