mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 17:31:20 +02:00
- fsmounter: formatting code using astyle
Conflicts: src/system/fsmounter.cpp Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -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",
|
||||
|
@@ -39,7 +39,6 @@
|
||||
|
||||
class CFSMounter
|
||||
{
|
||||
// protected
|
||||
public:
|
||||
|
||||
enum FS_Support
|
||||
|
Reference in New Issue
Block a user