Platform macros for QNX, & recognize the QNX-only 'Named special file' filetype
This commit is contained in:
parent
38ba317588
commit
d06b001efe
|
@ -133,7 +133,8 @@ struct cFSStatArgs {
|
|||
TY_FIFO,
|
||||
TY_SOCK,
|
||||
TY_DOOR,
|
||||
TY_PORT
|
||||
TY_PORT,
|
||||
TY_NAMED
|
||||
};
|
||||
|
||||
// attr is fs dependent?
|
||||
|
|
|
@ -85,6 +85,7 @@
|
|||
#define OS_RTEMS 0x0509
|
||||
#define OS_RISCOS 0x050A
|
||||
#define OS_REDOX 0x050B
|
||||
#define OS_QNX 0x050C
|
||||
|
||||
#define COMP_UNKNOWN 0
|
||||
#define COMP_GCC 0x0001
|
||||
|
@ -241,6 +242,10 @@
|
|||
#define OS OS_REDOX
|
||||
#define IS_REDOX 1
|
||||
|
||||
#elif defined(__QNX__)
|
||||
#define OS OS_QNX
|
||||
#define IS_QNX 1
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -386,7 +386,11 @@ void cUnixFSServices::Stat( const TSTRING& strNameC, cFSStatArgs& stat) const
|
|||
#if HAVE_PORT_CREATE
|
||||
else if(S_ISPORT(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_PORT;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef S_ISNAM
|
||||
else if(S_ISNAM(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_NAMED;
|
||||
#endif
|
||||
|
||||
else stat.mFileType = cFSStatArgs::TY_INVALID;
|
||||
}
|
||||
|
||||
|
@ -625,6 +629,12 @@ void cUnixFSServices::ConvertModeToString( uint64 perm, TSTRING& tstrPerm ) cons
|
|||
szPerm[0] = _T('P');
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef S_IFNAM
|
||||
case S_IFNAM:
|
||||
szPerm[0] = _T('n');
|
||||
break;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -271,6 +271,9 @@ bool cFSDataSourceIter::InitializeTypeInfo(iFCO* pFCO)
|
|||
case cFSStatArgs::TY_PORT:
|
||||
propSet.SetFileType(cFSPropSet::FT_PORT);
|
||||
break;
|
||||
case cFSStatArgs::TY_NAMED:
|
||||
propSet.SetFileType(cFSPropSet::FT_NAMED);
|
||||
break;
|
||||
default:
|
||||
// set it to invalid
|
||||
propSet.SetFileType(cFSPropSet::FT_INVALID);
|
||||
|
|
|
@ -304,6 +304,9 @@ void cFSPropCalc::HandleStatProperties( const cFCOPropVector& propsToCheck, cons
|
|||
case cFSStatArgs::TY_PORT:
|
||||
propSet.SetFileType(cFSPropSet::FT_PORT);
|
||||
break;
|
||||
case cFSStatArgs::TY_NAMED:
|
||||
propSet.SetFileType(cFSPropSet::FT_NAMED);
|
||||
break;
|
||||
default:
|
||||
// set it to invalid
|
||||
propSet.SetFileType(cFSPropSet::FT_INVALID);
|
||||
|
|
|
@ -60,7 +60,8 @@ TSTRING cFCOPropFileType::AsString() const
|
|||
fs::STR_FT_FIFO,
|
||||
fs::STR_FT_SOCK,
|
||||
fs::STR_FT_DOOR,
|
||||
fs::STR_FT_PORT
|
||||
fs::STR_FT_PORT,
|
||||
fs::STR_FT_NAMED
|
||||
};
|
||||
|
||||
int32 fileType = GetValue();
|
||||
|
|
|
@ -111,6 +111,7 @@ public:
|
|||
FT_SOCK,
|
||||
FT_DOOR,
|
||||
FT_PORT,
|
||||
FT_NAMED,
|
||||
FT_NUMITEMS
|
||||
};
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ TSS_BeginStringtable( cFS )
|
|||
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") ),
|
||||
TSS_StringEntry( fs::STR_FT_NAMED, _T("Named Special File") ),
|
||||
|
||||
// property names
|
||||
TSS_StringEntry( fs::STR_PROP_DEV, _T("Device Number") ),
|
||||
|
|
|
@ -55,6 +55,7 @@ TSS_BeginStringIds( fs )
|
|||
STR_FT_SOCK,
|
||||
STR_FT_DOOR,
|
||||
STR_FT_PORT,
|
||||
STR_FT_NAMED,
|
||||
|
||||
// property names
|
||||
STR_PROP_DEV,
|
||||
|
|
|
@ -297,6 +297,8 @@ const TSTRING expected_os("RTEMS");
|
|||
const TSTRING expected_os("RISC OS");
|
||||
#elif IS_RISCOS
|
||||
const TSTRING expected_os("Redox");
|
||||
#elif IS_QNX
|
||||
const TSTRING expected_os("QNX");
|
||||
#else
|
||||
const TSTRING expected_os("?!?!?");
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue