Skip to content

Commit 0cc5a6c

Browse files
committed
rename the ad binary to nad, GitHub #2337
The new name, nad, stands for Netatalk AppleDouble, emphasizing that it is operating on Netatalk style AppleDouble metadata specifically, and depends on Netatalk running on the same host that you run nad on. This also reduces some ambiguity in the Netatalk codebase, since "ad" is used internally to also refer to the AppleDouble module in libatalk, for instance the "logtype_ad" logtype in the netatalk logger module.
1 parent 5271d18 commit 0cc5a6c

25 files changed

+193
-192
lines changed

bin/ad/meson.build

Lines changed: 0 additions & 35 deletions
This file was deleted.

bin/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
subdir('ad')
21
subdir('afppasswd')
32
subdir('misc')
3+
subdir('nad')
44

55
if have_appletalk
66
subdir('aecho')
File renamed without changes.
File renamed without changes.

bin/nad/meson.build

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
nad_sources = [
2+
'ftw.c',
3+
'nad_cp.c',
4+
'nad_find.c',
5+
'nad_ls.c',
6+
'nad_mv.c',
7+
'nad_rm.c',
8+
'nad_set.c',
9+
'nad_util.c',
10+
'nad.c',
11+
]
12+
13+
nad_deps = [bstring, iniparser]
14+
15+
if have_iconv
16+
nad_deps += iconv
17+
endif
18+
19+
if use_mysql_backend
20+
nad_deps += mysqlclient
21+
endif
22+
23+
executable(
24+
'nad',
25+
nad_sources,
26+
include_directories: root_includes,
27+
dependencies: nad_deps,
28+
link_with: libatalk,
29+
c_args: [naddir, dversion],
30+
install: true,
31+
build_rpath: rpath_libdir,
32+
install_rpath: rpath_libdir,
33+
)

bin/ad/ad.c renamed to bin/nad/nad.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@
3232
#include <atalk/netatalk_conf.h>
3333
#include <atalk/util.h>
3434

35-
#include "ad.h"
35+
#include "nad.h"
3636

3737
static void usage_main(void)
3838
{
39-
printf("Usage: ad ls|cp|rm|mv|set|find [file|dir, ...]\n");
40-
printf(" ad -v|--version\n");
39+
printf("Usage: nad ls|cp|rm|mv|set|find [file|dir, ...]\n");
40+
printf(" nad -v|--version\n");
4141
}
4242

4343
static void show_version(void)
4444
{
45-
printf("ad (Netatalk %s)\n", VERSION);
45+
printf("nad (Netatalk %s)\n", VERSION);
4646
}
4747

4848
int main(int argc, char **argv)
@@ -54,7 +54,7 @@ int main(int argc, char **argv)
5454
return 1;
5555
}
5656

57-
if (afp_config_parse(&obj, "ad") != 0) {
57+
if (afp_config_parse(&obj, "nad") != 0) {
5858
return 1;
5959
}
6060

File renamed without changes.

bin/ad/ad_cp.c renamed to bin/nad/nad_cp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
#include <atalk/vfs.h>
7474
#include <atalk/volume.h>
7575

76-
#include "ad.h"
76+
#include "nad.h"
7777
#include "ftw.h"
7878

7979
#define STRIP_TRAILING_SLASH(p) { \
@@ -163,8 +163,8 @@ static void set_signal(void)
163163
static void usage_cp(void)
164164
{
165165
printf(
166-
"Usage: ad cp [-R] [-aipvf] <source_file> <target_file>\n"
167-
" ad cp [-R] [-aipvfx] <source_file [source_file ...]> <target_directory>\n\n"
166+
"Usage: nad cp [-R] [-aipvf] <source_file> <target_file>\n"
167+
" nad cp [-R] [-aipvfx] <source_file [source_file ...]> <target_directory>\n\n"
168168
"In the first synopsis form, the cp utility copies the contents of the source_file to the\n"
169169
"target_file. In the second synopsis form, the contents of each named source_file is copied to the\n"
170170
"destination target_directory. The names of the files themselves are not changed. If cp detects an\n"

bin/ad/ad_find.c renamed to bin/nad/nad_find.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include <atalk/unicode.h>
3535
#include <atalk/util.h>
3636

37-
#include "ad.h"
37+
#include "nad.h"
3838

3939
static volatile sig_atomic_t alarmed;
4040

@@ -84,7 +84,7 @@ static void set_signal(void)
8484
static void usage_find(void)
8585
{
8686
printf(
87-
"Usage: ad find [-v VOLUME_PATH] NAME\n"
87+
"Usage: nad find [-v VOLUME_PATH] NAME\n"
8888
);
8989
}
9090

bin/ad/ad_ls.c renamed to bin/nad/nad_ls.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include <atalk/adouble.h>
3535
#include <atalk/cnid.h>
3636

37-
#include "ad.h"
37+
#include "nad.h"
3838

3939
#define ADv2_DIRNAME ".AppleDouble"
4040

@@ -136,7 +136,7 @@ static const char *check_netatalk_dirs(const char *name)
136136
static void usage_ls(void)
137137
{
138138
printf(
139-
"Usage: ad ls [-dRl[u]] [file|dir, ...]\n\n"
139+
"Usage: nad ls [-dRl[u]] [file|dir, ...]\n\n"
140140
" -l Long Output [-u: unix info]:\n"
141141
" <unixinfo ...> <FinderFlags> <AFPAttributes> <Color> <Type> <Creator> <CNID from AppleDouble> <name>\n\n"
142142
" FinderFlags (valid for (f)ile and/or (d)irectory):\n"

0 commit comments

Comments
 (0)