X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Futils%2Fliblustreapi_nodemap.c;h=5e25fff3fa518762dca49f7c960a58404a21f392;hb=5b468e20ecc0b77460444393d1bb41867d99899d;hp=3a9bd090dc699c39579bc0e91c311eb35273a3e5;hpb=ae295503f53e867e11dc51b217f336e8b20d119f;p=fs%2Flustre-release.git diff --git a/lustre/utils/liblustreapi_nodemap.c b/lustre/utils/liblustreapi_nodemap.c index 3a9bd090..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) - 1, "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; }