- fsmounter: formatting code using astyle

Conflicts:
	src/system/fsmounter.cpp

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2021-05-15 21:59:40 +02:00
committed by Thilo Graf
parent cdc91ef601
commit 2f20d8d670
2 changed files with 108 additions and 105 deletions

View File

@@ -167,7 +167,8 @@ bool CFSMounter::isMounted(const std::string &local_dir)
#else
char mount_point[4096];
#endif
if (realpath(local_dir.c_str(), mount_point) == NULL) {
if (realpath(local_dir.c_str(), mount_point) == NULL)
{
printf("[CFSMounter] could not resolve dir: %s: %s\n", local_dir.c_str(), strerror(errno));
return false;
}
@@ -176,6 +177,10 @@ bool CFSMounter::isMounted(const std::string &local_dir)
{
MountInfo mi;
in >> mi.device >> mi.mountPoint >> mi.type;
if (mi.type == "tmpfs")
continue;
if (strcmp(mi.mountPoint.c_str(), mount_point) == 0)
{
return true;
@@ -300,7 +305,8 @@ CFSMounter::MountRes CFSMounter::mount(const std::string &ip, const std::string
timeout.tv_nsec = 0;
retcode = pthread_cond_timedwait(&g_cond, &g_mut, &timeout);
if (retcode == ETIMEDOUT)
{ // timeout occurred
{
// timeout occurred
pthread_cancel(g_mnt);
}
pthread_mutex_unlock(&g_mut);
@@ -373,9 +379,7 @@ void CFSMounter::getMountedFS(MountInfos& info)
MountInfo mi;
in >> mi.device >> mi.mountPoint >> mi.type;
in.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
if (mi.type == "nfs" ||
mi.type == "cifs" ||
mi.type == "lufs")
if (mi.type == "nfs" || mi.type == "cifs" || mi.type == "lufs")
{
info.push_back(mi);
printf("[CFSMounter] mounted fs: dev: %s, mp: %s, type: %s\n",

View File

@@ -39,7 +39,6 @@
class CFSMounter
{
// protected
public:
enum FS_Support