Display doors & event ports correctly (Solaris)
This commit is contained in:
parent
c136c5b398
commit
2d04929991
|
@ -128,7 +128,9 @@ struct cFSStatArgs {
|
|||
TY_CHARDEV,
|
||||
TY_SYMLINK,
|
||||
TY_FIFO,
|
||||
TY_SOCK
|
||||
TY_SOCK,
|
||||
TY_DOOR,
|
||||
TY_PORT
|
||||
};
|
||||
|
||||
// attr is fs dependent?
|
||||
|
|
|
@ -381,14 +381,21 @@ void cUnixFSServices::Stat( const TSTRING& strNameC, cFSStatArgs& stat) const th
|
|||
stat.blocks = statbuf.st_blocks;
|
||||
|
||||
// set the file type
|
||||
if(S_ISREG(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_FILE;
|
||||
if(S_ISREG(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_FILE;
|
||||
else if(S_ISDIR(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_DIR;
|
||||
else if(S_ISLNK(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_SYMLINK;
|
||||
else if(S_ISBLK(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_BLOCKDEV;
|
||||
else if(S_ISCHR(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_CHARDEV;
|
||||
else if(S_ISFIFO(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_FIFO;
|
||||
else if(S_ISSOCK(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_SOCK;
|
||||
else stat.mFileType = cFSStatArgs::TY_INVALID;
|
||||
#ifdef S_IFDOOR
|
||||
else if(S_ISDOOR(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_DOOR;
|
||||
#endif
|
||||
#ifdef S_IFPORT
|
||||
else if(S_ISPORT(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_PORT;
|
||||
#endif
|
||||
|
||||
else stat.mFileType = cFSStatArgs::TY_INVALID;
|
||||
}
|
||||
|
||||
void cUnixFSServices::GetMachineName( TSTRING& strName ) const throw( eFSServices )
|
||||
|
@ -589,18 +596,29 @@ void cUnixFSServices::ConvertModeToString( uint64 perm, TSTRING& tstrPerm ) cons
|
|||
{
|
||||
case S_IFDIR:
|
||||
szPerm[0] = _T('d');
|
||||
break;
|
||||
break;
|
||||
case S_IFCHR:
|
||||
szPerm[0] = _T('c');
|
||||
break;
|
||||
break;
|
||||
case S_IFBLK:
|
||||
szPerm[0] = _T('b');
|
||||
break;
|
||||
break;
|
||||
case S_IFIFO:
|
||||
szPerm[0] = _T('p');
|
||||
break;
|
||||
break;
|
||||
case S_IFLNK:
|
||||
szPerm[0] = _T('l');
|
||||
break;
|
||||
#ifdef S_IFDOOR
|
||||
case S_IFDOOR:
|
||||
szPerm[0] = _T('D');
|
||||
break
|
||||
#endif
|
||||
#ifdef S_IFPORT
|
||||
case S_IFPORT:
|
||||
szPerm[0] = _T('P');
|
||||
break;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -249,6 +249,12 @@ bool cFSDataSourceIter::InitializeTypeInfo(iFCO* pFCO)
|
|||
case cFSStatArgs::TY_SOCK:
|
||||
propSet.SetFileType(cFSPropSet::FT_SOCK);
|
||||
break;
|
||||
case cFSStatArgs::TY_DOOR:
|
||||
propSet.SetFileType(cFSPropSet::FT_DOOR);
|
||||
break;
|
||||
case cFSStatArgs::TY_PORT:
|
||||
propSet.SetFileType(cFSPropSet::FT_PORT);
|
||||
break;
|
||||
default:
|
||||
// set it to invalid
|
||||
propSet.SetFileType(cFSPropSet::FT_INVALID);
|
||||
|
|
|
@ -255,6 +255,12 @@ void cFSPropCalc::VisitFSObject(cFSObject& obj)
|
|||
case cFSStatArgs::TY_SOCK:
|
||||
propSet.SetFileType(cFSPropSet::FT_SOCK);
|
||||
break;
|
||||
case cFSStatArgs::TY_DOOR:
|
||||
propSet.SetFileType(cFSPropSet::FT_DOOR);
|
||||
break;
|
||||
case cFSStatArgs::TY_PORT:
|
||||
propSet.SetFileType(cFSPropSet::FT_PORT);
|
||||
break;
|
||||
default:
|
||||
// set it to invalid
|
||||
propSet.SetFileType(cFSPropSet::FT_INVALID);
|
||||
|
|
|
@ -58,7 +58,9 @@ TSTRING cFCOPropFileType::AsString() const
|
|||
fs::STR_FT_CHARDEV,
|
||||
fs::STR_FT_SYMLINK,
|
||||
fs::STR_FT_FIFO,
|
||||
fs::STR_FT_SOCK
|
||||
fs::STR_FT_SOCK,
|
||||
fs::STR_FT_DOOR,
|
||||
fs::STR_FT_PORT
|
||||
};
|
||||
|
||||
int32 fileType = GetValue();
|
||||
|
|
|
@ -109,6 +109,8 @@ public:
|
|||
FT_SYMLINK,
|
||||
FT_FIFO,
|
||||
FT_SOCK,
|
||||
FT_DOOR,
|
||||
FT_PORT,
|
||||
FT_NUMITEMS
|
||||
};
|
||||
|
||||
|
|
|
@ -49,6 +49,8 @@ TSS_BeginStringtable( cFS )
|
|||
TSS_StringEntry( fs::STR_FT_SYMLINK, _T("Symbolic Link") ),
|
||||
TSS_StringEntry( fs::STR_FT_FIFO, _T("FIFO") ),
|
||||
TSS_StringEntry( fs::STR_FT_SOCK, _T("Socket") ),
|
||||
TSS_StringEntry( fs::STR_FT_DOOR, _T("Door") ),
|
||||
TSS_StringEntry( fs::STR_FT_PORT, _T("Event Port") ),
|
||||
|
||||
// property names
|
||||
TSS_StringEntry( fs::STR_PROP_DEV, _T("Device Number") ),
|
||||
|
|
|
@ -53,6 +53,8 @@ TSS_BeginStringIds( fs )
|
|||
STR_FT_SYMLINK,
|
||||
STR_FT_FIFO,
|
||||
STR_FT_SOCK,
|
||||
STR_FT_DOOR,
|
||||
STR_FT_PORT,
|
||||
|
||||
// property names
|
||||
STR_PROP_DEV,
|
||||
|
|
Loading…
Reference in New Issue