salvage: require bundled static yyjson
Some checks failed
Source release / source-package (push) Failing after 11m41s
Some checks failed
Source release / source-package (push) Failing after 11m41s
This commit is contained in:
@@ -76,11 +76,7 @@ add_executable(ftrustee ftrustee.c tools.c nwfname.c unxfile.c nwvolume.c nwattr
|
||||
##############
|
||||
|
||||
target_link_libraries(nwserv ${CRYPT_LIBRARIES} )
|
||||
target_link_libraries(nwconn ${CRYPT_LIBRARIES} ${XATTR_LIBRARIES} )
|
||||
if(MARS_NWE_HAVE_YYJSON)
|
||||
target_compile_definitions(nwconn PRIVATE MARS_NWE_HAVE_YYJSON)
|
||||
target_link_libraries(nwconn yyjson)
|
||||
endif()
|
||||
target_link_libraries(nwconn ${CRYPT_LIBRARIES} ${XATTR_LIBRARIES} yyjson )
|
||||
target_link_libraries(ncpserv ${CRYPT_LIBRARIES} )
|
||||
target_link_libraries(nwclient ${CRYPT_LIBRARIES} )
|
||||
target_link_libraries(nwbind ${CRYPT_LIBRARIES} ${GDBM_LIBRARIES} )
|
||||
|
||||
@@ -13,10 +13,8 @@
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#ifdef MARS_NWE_HAVE_YYJSON
|
||||
#include <stdint.h>
|
||||
#include <yyjson.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -364,7 +362,6 @@ int nwsalvage_build_metadata_path(char *out, size_t out_len,
|
||||
config->metadata_repository, relative_path, ".json"));
|
||||
}
|
||||
|
||||
#ifdef MARS_NWE_HAVE_YYJSON
|
||||
static int make_dir_if_missing(const char *path)
|
||||
{
|
||||
struct stat st;
|
||||
@@ -426,28 +423,7 @@ static int make_parent_dirs(const char *path)
|
||||
|
||||
return(make_dir_if_missing(tmp));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef MARS_NWE_HAVE_YYJSON
|
||||
int nwsalvage_write_metadata(const char *metadata_path,
|
||||
const struct nwsalvage_deleted_entry *entry)
|
||||
{
|
||||
(void)metadata_path;
|
||||
(void)entry;
|
||||
errno = ENOSYS;
|
||||
return(-1);
|
||||
}
|
||||
|
||||
int nwsalvage_read_metadata(const char *metadata_path,
|
||||
struct nwsalvage_metadata_entry *entry)
|
||||
{
|
||||
(void)metadata_path;
|
||||
if (entry)
|
||||
memset(entry, 0, sizeof(*entry));
|
||||
errno = ENOSYS;
|
||||
return(-1);
|
||||
}
|
||||
#else
|
||||
static const char *metadata_source(const struct nwsalvage_deleted_entry *entry)
|
||||
{
|
||||
return(entry->source && *entry->source ? entry->source : "mars_nwe");
|
||||
@@ -1008,9 +984,7 @@ int nwsalvage_read_metadata(const char *metadata_path,
|
||||
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MARS_NWE_HAVE_YYJSON
|
||||
static int nwsalvage_move_deleted_file(const char *live_path,
|
||||
const char *recycle_path,
|
||||
const char *metadata_path,
|
||||
@@ -1065,7 +1039,6 @@ static int nwsalvage_move_deleted_file(const char *live_path,
|
||||
errno = saved_errno;
|
||||
return(-1);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int nwsalvage_ini_get(int entry, char *str, size_t strsize, void *data)
|
||||
{
|
||||
@@ -1301,12 +1274,6 @@ static void nwsalvage_fill_trustees(int volume, const char *unixname,
|
||||
int nwsalvage_capture_node_delete(int volume, const char *unixname,
|
||||
const struct stat *stb)
|
||||
{
|
||||
#ifndef MARS_NWE_HAVE_YYJSON
|
||||
(void)volume;
|
||||
(void)unixname;
|
||||
(void)stb;
|
||||
return(1);
|
||||
#else
|
||||
struct nwsalvage_config config;
|
||||
struct nwsalvage_deleted_entry entry;
|
||||
char volume_root[NWSALVAGE_PATH_MAX];
|
||||
@@ -1412,5 +1379,4 @@ int nwsalvage_capture_node_delete(int volume, const char *unixname,
|
||||
return(-1);
|
||||
|
||||
return(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user