#include <dirent.h>
#include <errno.h>
#include <getopt.h>
+#include <pthread.h>
#include <time.h>
#include <utime.h>
#include <sys/time.h>
# define NSEC_PER_SEC 1000000000UL
#endif
-/* copytool uses a 32b bitmask field to register with kuc
- * archive num = 0 => all
- * archive num from 1 to 32
- */
-#define MAX_ARCHIVE_CNT (sizeof(__u32) * 8)
-
enum ct_action {
CA_IMPORT = 1,
CA_REBIND,
int o_verbose;
int o_copy_xattrs;
int o_archive_cnt;
- int o_archive_id[MAX_ARCHIVE_CNT];
+ int o_archive_id[LL_HSM_MAX_ARCHIVE];
int o_report_int;
unsigned long long o_bandwidth;
size_t o_chunk_size;
long_opts, NULL)) != -1) {
switch (c) {
case 'A':
- if ((opt.o_archive_cnt >= MAX_ARCHIVE_CNT) ||
- (atoi(optarg) >= MAX_ARCHIVE_CNT)) {
+ if ((opt.o_archive_cnt >= LL_HSM_MAX_ARCHIVE) ||
+ (atoi(optarg) >= LL_HSM_MAX_ARCHIVE)) {
rc = -E2BIG;
CT_ERROR(rc, "archive number must be less"
- "than %zu", MAX_ARCHIVE_CNT);
+ "than %zu", LL_HSM_MAX_ARCHIVE);
return rc;
}
opt.o_archive_id[opt.o_archive_cnt] = atoi(optarg);
CT_TRACE("action=%d src=%s dst=%s mount_point=%s",
opt.o_action, opt.o_src, opt.o_dst, opt.o_mnt);
- if (!opt.o_dry_run && opt.o_hsm_root == NULL) {
+ if (opt.o_hsm_root == NULL) {
rc = -EINVAL;
CT_ERROR(rc, "must specify a root directory for the backend");
return rc;
if (line)
free(line);
- /* return 0 if all rebinds were sucessful */
+ /* return 0 if all rebinds were successful */
CT_TRACE("%u lines read from '%s', %u rebind successful", nl, list, ok);
return ok == nl ? 0 : -1;