*/
/*
* Copyright (C) 2013, Trustees of Indiana University
+ *
+ * Copyright (c) 2014, Intel Corporation.
+ *
* Author: Joshua Walgenbach <jjw@iu.edu>
*/
+#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <liblustre.h>
-#include <lustre/lustreapi.h>
-#include "lustreapi_internal.h"
+#include <libcfs/util/param.h>
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;
}