Catalog* VfsFactory::createCatalog(PluginManager*) throw (DmException)
{
- syslog(LOG_DEBUG, "%s", __func__);
+ debug("");
return new VfsCatalog(this->hostName_, this->nsPrefix_, this->allow_, this->deny_, this->allowWrite_, this->denyWrite_);
}
PoolManager* VfsFactory::createPoolManager(PluginManager*) throw (DmException)
{
- syslog(LOG_DEBUG, "%s", __func__);
+ debug("");
return new VfsPoolManager(this->hostName_,
this->tokenPasswd_, this->tokenUseIp_,
this->tokenLife_);
PoolDriver* VfsFactory::createPoolDriver() throw (DmException)
{
- syslog(LOG_DEBUG, "%s", __func__);
+ debug("");
return new VfsPoolDriver(this->hostName_, this->nsPrefix_,
this->tokenPasswd_, this->tokenUseIp_,
this->tokenLife_);
IODriver* VfsFactory::createIODriver(PluginManager*) throw (DmException)
{
- syslog(LOG_DEBUG, "%s", __func__);
+ debug("");
return new VfsIODriver(this->diskPrefix_, this->tokenPasswd_, this->tokenUseIp_);
}
Authn* VfsFactory::createAuthn(PluginManager*) throw (DmException)
{
- syslog(LOG_DEBUG, "%s", __func__);
+ debug("");
return new VfsAuthn();
}
else curdir = curdir + "/" + components[i];
// ignore all errors - just go from "/" toward deeper levels
if (mkdir(curdir.c_str(), 0755) == 0)
- syslog(LOG_DEBUG, "%s: created directory '%s'", __func__, curdir.c_str());
+ debug("created directory '%s'", curdir.c_str());
}
}
lpath = getLocalPath(path);
this->fd_ = ::open(lpath.c_str(), flags, mode);
- syslog(LOG_DEBUG, "%s: open('%s', flags=%04X, mode=%04o) = %d", __func__, lpath.c_str(), flags, mode, this->fd_);
+ debug("open('%s', flags=%04X, mode=%04o) = %d", lpath.c_str(), flags, mode, this->fd_);
if (this->fd_ == -1)
vfsThrowErrno("could not open '%s'", lpath.c_str());
}
lpath = getLocalPath(path);
wrapCall(chdir(lpath.c_str()));
- syslog(LOG_DEBUG, "%s: changed to '%s'", __func__, lpath.c_str());
+ debug("changed to '%s'", lpath.c_str());
}
for (it = oldXattrs.begin(); it != oldXattrs.end(); it++) {
key = it->first;
value = Extensible::anyToString(it->second);
- syslog(LOG_DEBUG, "%s: removing '%s' = '%s' from '%s'", __func__, key.c_str(), value.c_str(), lpath.c_str());
+ debug("removing '%s' = '%s' from '%s'", key.c_str(), value.c_str(), lpath.c_str());
wrapCall(attr_remove(lpath.c_str(), key.c_str(), 0), "could not remove '%s' on '%s'", key.c_str(), path.c_str());
}
}
lpath = getLocalPath(path);
privateDir = vfsOpenDir(lpath, path);
- syslog(LOG_DEBUG, "%s: directory '%s' opened", __func__, lpath.c_str());
+ debug("directory '%s' opened", lpath.c_str());
return privateDir;
}
delete privateDir;
wrapCall(r, "error closing directory '%s'", path.c_str());
- syslog(LOG_DEBUG, "%s: directory '%s' closed", __func__, lpath.c_str());
+ debug("directory '%s' closed", lpath.c_str());
}
if (!ent && errno)
vfsThrow(errno, "readdir() on '%s' failed", privateDir->path.c_str());
- syslog(LOG_DEBUG, "%s: result %s", __func__, ent ? ent->d_name : "(null)");
+ debug("result %s", ent ? ent->d_name : "(null)");
return static_cast<struct dirent*>(ent);
}
entry = ATTR_ENTRY(this->buffer, i);
// "selinux" is returned in the list, but failing to get the value
if (strcmp(entry->a_name, "selinux") == 0) {
- //syslog(LOG_DEBUG, "%s: skipping attribute '%s'", __func__, entry->a_name);
+ //debug("skipping attribute '%s'", entry->a_name);
} else {
len = sizeof this->xattrValue;
wrapCall(attr_get(lpath.c_str(), entry->a_name, this->xattrValue, &len, follow ? 0 : ATTR_DONTFOLLOW), "could not get extended attribute '%s' on '%s'", entry->a_name, path.c_str());
- syslog(LOG_DEBUG, "%s: '%s' = '%.*s'", __func__, entry->a_name, len, this->xattrValue);
+ debug("'%s' = '%.*s'", entry->a_name, len, this->xattrValue);
attrValue.assign(this->xattrValue, len);
xattrs[entry->a_name] = attrValue;
}
void VfsCatalog::vfsSetXattr(const std::string& path, const std::string& lpath, const std::string key, const std::string value, int flags) {
switch (flags & (ATTR_REPLACE | ATTR_CREATE)) {
case ATTR_REPLACE:
- syslog(LOG_DEBUG, "%s: replacing '%s' -> '%s' on '%s'", __func__, key.c_str(), value.c_str(), lpath.c_str());
+ debug("replacing '%s' -> '%s' on '%s'", key.c_str(), value.c_str(), lpath.c_str());
wrapCall(attr_set(lpath.c_str(), key.c_str(), value.c_str(), value.size(), flags), "could not replace extended attribute '%s' on '%s'", key.c_str(), path.c_str());
break;
case ATTR_CREATE:
- syslog(LOG_DEBUG, "%s: creating '%s' -> '%s' on '%s'", __func__, key.c_str(), value.c_str(), lpath.c_str());
+ debug("creating '%s' -> '%s' on '%s'", key.c_str(), value.c_str(), lpath.c_str());
wrapCall(attr_set(lpath.c_str(), key.c_str(), value.c_str(), value.size(), flags), "could not create extended attribute '%s' on '%s'", key.c_str(), path.c_str());
break;
default:
- syslog(LOG_DEBUG, "%s: setting '%s' -> '%s' on '%s'", __func__, key.c_str(), value.c_str(), lpath.c_str());
+ debug("setting '%s' -> '%s' on '%s'", key.c_str(), value.c_str(), lpath.c_str());
wrapCall(attr_set(lpath.c_str(), key.c_str(), value.c_str(), value.size(), flags), "could not set extended attribute '%s' on '%s'", key.c_str(), path.c_str());
break;
}
if (value.empty()) return 0;
- //syslog(LOG_DEBUG, "%s: %s regex: '%s'\n", __func__, name, value.c_str());
+ //debug("%s regex: '%s'\n", name, value.c_str());
if ((ret = regcomp(®ex, value.c_str(), REG_EXTENDED | REG_NOSUB)) != 0) {
regerror(ret, ®ex, buf, sizeof buf);
vfsThrow(EINVAL, "invalid regular expresion for '%s': %s", name, buf);