Пример #1
0
int process_server(const char *server) {
	struct exportnode *exports;
	struct exportnode *export;

	exports = mount_getexports(server);
	if (exports == NULL) {
		fprintf(stderr, "Failed to get exports for server %s.\n", server);
		return -1;
	}
	for (export=exports; export; export = export->ex_next) {
Пример #2
0
std::list<std::string> CNFSConnection::GetExportList()
{
  std::list<std::string> retList;

  struct exportnode *exportlist, *tmp;
  exportlist = mount_getexports(m_resolvedHostName.c_str());
  tmp = exportlist;

  for(tmp = exportlist; tmp!=NULL; tmp=tmp->ex_next)
  {
    retList.push_back(std::string(tmp->ex_dir));
  }      

  mount_free_export_list(exportlist);
  retList.sort();
  retList.reverse();

  return retList;
}