netatalk  4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
nad_set.c File Reference
#include <ctype.h>
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <grp.h>
#include <limits.h>
#include <pwd.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#include <atalk/adouble.h>
#include <atalk/cnid.h>
#include "nad.h"

Macros

#define ADv2_DIRNAME   ".AppleDouble"
 
#define DIR_DOT_OR_DOTDOT(a)    ((strcmp(a, ".") == 0) || (strcmp(a, "..") == 0))
 

Functions

static void usage_set (void)
 
static void change_type (char *path, afpvol_t *vol, const struct stat *st, struct adouble *ad, char *p_new_type)
 
static void change_creator (char *path, afpvol_t *vol, const struct stat *st, struct adouble *ad, char *p_new_creator)
 
static void change_label (char *path, afpvol_t *vol, const struct stat *st, struct adouble *ad, char *p_new_label)
 
static void change_attributes (char *path, afpvol_t *vol, const struct stat *st, struct adouble *ad, char *p_new_attributes)
 
static void change_flags (char *path, afpvol_t *vol, const struct stat *st, struct adouble *ad, char *p_new_flags)
 
int nad_set (int argc, char **argv, AFPObj *obj)
 

Variables

static const char * labels []
 
static char * new_label
 
static char * new_type
 
static char * new_creator
 
static char * new_flags
 
static char * new_attributes
 

Macro Definition Documentation

◆ ADv2_DIRNAME

#define ADv2_DIRNAME   ".AppleDouble"

◆ DIR_DOT_OR_DOTDOT

#define DIR_DOT_OR_DOTDOT (   a)     ((strcmp(a, ".") == 0) || (strcmp(a, "..") == 0))

Function Documentation

◆ change_attributes()

static void change_attributes ( char *  path,
afpvol_t vol,
const struct stat *  st,
struct adouble ad,
char *  p_new_attributes 
)
static

◆ change_creator()

static void change_creator ( char *  path,
afpvol_t vol,
const struct stat *  st,
struct adouble ad,
char *  p_new_creator 
)
static

◆ change_flags()

static void change_flags ( char *  path,
afpvol_t vol,
const struct stat *  st,
struct adouble ad,
char *  p_new_flags 
)
static

◆ change_label()

static void change_label ( char *  path,
afpvol_t vol,
const struct stat *  st,
struct adouble ad,
char *  p_new_label 
)
static

◆ change_type()

static void change_type ( char *  path,
afpvol_t vol,
const struct stat *  st,
struct adouble ad,
char *  p_new_type 
)
static

◆ nad_set()

int nad_set ( int  argc,
char **  argv,
AFPObj obj 
)

◆ usage_set()

static void usage_set ( void  )
static

Variable Documentation

◆ labels

const char* labels[]
static
Initial value:
= {
"none",
"grey",
"green",
"violet",
"blue",
"yellow",
"red",
"orange",
NULL
}

◆ new_attributes

char* new_attributes
static

◆ new_creator

char* new_creator
static

◆ new_flags

char* new_flags
static

◆ new_label

char* new_label
static

◆ new_type

char* new_type
static