mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 07:22:57 +02:00
fsmounter: formatting code using astyle
Origin commit data
------------------
Commit: 5648bbe1cd
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-05-15 (Sat, 15 May 2021)
Origin message was:
------------------
- fsmounter: formatting code using astyle
This commit is contained in:
@@ -167,7 +167,8 @@ bool CFSMounter::isMounted(const std::string &local_dir)
|
|||||||
#else
|
#else
|
||||||
char mount_point[4096];
|
char mount_point[4096];
|
||||||
#endif
|
#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));
|
printf("[CFSMounter] could not resolve dir: %s: %s\n", local_dir.c_str(), strerror(errno));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -305,7 +306,8 @@ CFSMounter::MountRes CFSMounter::mount(const std::string &ip, const std::string
|
|||||||
timeout.tv_nsec = 0;
|
timeout.tv_nsec = 0;
|
||||||
retcode = pthread_cond_timedwait(&g_cond, &g_mut, &timeout);
|
retcode = pthread_cond_timedwait(&g_cond, &g_mut, &timeout);
|
||||||
if (retcode == ETIMEDOUT)
|
if (retcode == ETIMEDOUT)
|
||||||
{ // timeout occurred
|
{
|
||||||
|
// timeout occurred
|
||||||
pthread_cancel(g_mnt);
|
pthread_cancel(g_mnt);
|
||||||
}
|
}
|
||||||
pthread_mutex_unlock(&g_mut);
|
pthread_mutex_unlock(&g_mut);
|
||||||
@@ -378,9 +380,7 @@ void CFSMounter::getMountedFS(MountInfos& info)
|
|||||||
MountInfo mi;
|
MountInfo mi;
|
||||||
in >> mi.device >> mi.mountPoint >> mi.type;
|
in >> mi.device >> mi.mountPoint >> mi.type;
|
||||||
in.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
|
in.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
|
||||||
if (mi.type == "nfs" ||
|
if (mi.type == "nfs" || mi.type == "cifs" || mi.type == "lufs")
|
||||||
mi.type == "cifs" ||
|
|
||||||
mi.type == "lufs")
|
|
||||||
{
|
{
|
||||||
info.push_back(mi);
|
info.push_back(mi);
|
||||||
printf("[CFSMounter] mounted fs: dev: %s, mp: %s, type: %s\n",
|
printf("[CFSMounter] mounted fs: dev: %s, mp: %s, type: %s\n",
|
||||||
|
@@ -39,7 +39,6 @@
|
|||||||
|
|
||||||
class CFSMounter
|
class CFSMounter
|
||||||
{
|
{
|
||||||
// protected
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
enum FS_Support
|
enum FS_Support
|
||||||
|
Reference in New Issue
Block a user