X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Futils%2Fliblustreapi_nodemap.c;h=5e25fff3fa518762dca49f7c960a58404a21f392;hb=d6f57eda898cc80a1cff49ad3875021749563dbf;hp=acd66e35c30481f8d3f1450502c6ca78225d2680;hpb=294b0efc31ae733c821fb76670238c51ca30d7f7;p=fs%2Flustre-release.git diff --git a/lustre/utils/liblustreapi_nodemap.c b/lustre/utils/liblustreapi_nodemap.c index acd66e3..5e25fff 100644 --- a/lustre/utils/liblustreapi_nodemap.c +++ b/lustre/utils/liblustreapi_nodemap.c @@ -18,21 +18,24 @@ */ /* * Copyright (C) 2013, Trustees of Indiana University + * + * Copyright (c) 2014, Intel Corporation. + * * Author: Joshua Walgenbach */ +#include #include #include #include -#include -#include -#include "lustreapi_internal.h" +#include int llapi_nodemap_exists(const char *nodemap) { - char mapname[PATH_MAX + 1]; - - snprintf(mapname, sizeof(mapname), "nodemap/%s", nodemap); + glob_t param; + int rc; - return get_param(mapname, NULL, 0); + rc = cfs_get_param_paths(¶m, "nodemap/%s", nodemap); + cfs_free_param_data(¶m); + return rc != 0 ? 1 : 0; }