netatalk  4.4.0dev
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
nad_ls.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)
#define TYPE(b)
#define MODE(b)

Functions

static void sig_handler (int signo _U_)
static void set_signal (void)
static const char * check_netatalk_dirs (const char *name)
static void usage_ls (void)
static void print_numlinks (const struct stat *statp)
static void print_owner (const struct stat *statp)
static void print_group (const struct stat *statp)
static void print_size (const struct stat *statp)
static void print_date (const struct stat *statp)
static void print_flags (char *path, afpvol_t *vol, const struct stat *st)
static void print_mode (const struct stat *st)
static int ad_print (char *path, const struct stat *st, afpvol_t *vol)
static int ad_ls_r (char *path, afpvol_t *vol)
int ad_ls (int argc, char **argv, AFPObj *obj)

Variables

static volatile sig_atomic_t alarmed
static int ls_a
static int ls_l
static int ls_R
static int ls_d
static int ls_u
static int first = 1
static int recursion
static char * netatalk_dirs []
static char * labels []

Macro Definition Documentation

◆ ADv2_DIRNAME

#define ADv2_DIRNAME   ".AppleDouble"

◆ DIR_DOT_OR_DOTDOT

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

◆ MODE

#define MODE ( b)
Value:
((st->st_mode & (b)) == (b))

◆ TYPE

#define TYPE ( b)
Value:
((st->st_mode & (S_IFMT)) == (b))

Function Documentation

◆ ad_ls()

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

◆ ad_ls_r()

int ad_ls_r ( char * path,
afpvol_t * vol )
static

◆ ad_print()

int ad_print ( char * path,
const struct stat * st,
afpvol_t * vol )
static

◆ check_netatalk_dirs()

const char * check_netatalk_dirs ( const char * name)
static

◆ print_date()

void print_date ( const struct stat * statp)
static

◆ print_flags()

void print_flags ( char * path,
afpvol_t * vol,
const struct stat * st )
static

◆ print_group()

void print_group ( const struct stat * statp)
static

◆ print_mode()

void print_mode ( const struct stat * st)
static

◆ print_numlinks()

void print_numlinks ( const struct stat * statp)
static

◆ print_owner()

void print_owner ( const struct stat * statp)
static

◆ print_size()

void print_size ( const struct stat * statp)
static

◆ set_signal()

void set_signal ( void )
static

◆ sig_handler()

void sig_handler ( int signo _U_)
static

◆ usage_ls()

void usage_ls ( void )
static

Variable Documentation

◆ alarmed

volatile sig_atomic_t alarmed
static

◆ first

int first = 1
static

◆ labels

char* labels[]
static
Initial value:
= {
"---",
"gry",
"gre",
"vio",
"blu",
"yel",
"red",
"ora"
}

◆ ls_a

int ls_a
static

◆ ls_d

int ls_d
static

◆ ls_l

int ls_l
static

◆ ls_R

int ls_R
static

◆ ls_u

int ls_u
static

◆ netatalk_dirs

char* netatalk_dirs[]
static
Initial value:
= {
".AppleDB",
".AppleDesktop",
NULL
}
#define ADv2_DIRNAME
Definition nad_ls.c:39

◆ recursion

int recursion
static