qstorageinfo_unix.cpp: fixes for NetBSD and solaris
NetBSD uses struct statvfs ** as first argument to getmntinfo. see: http://netbsd.gw.com/cgi-bin/man-cgi?getmntinfo getmntent on solaris and sunos returns an integer not a pointer. see: http://www.unix.com/man-page/opensolaris/3c/getmntent/ see: https://smartos.org/man/3C/getmntent Change-Id: Ic01da0edcf1f55617294e5a86b8459669e82c1b1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
96cc8eec9b
commit
a02c04a51b
@ -122,7 +122,11 @@ public:
|
||||
inline QByteArray device() const;
|
||||
private:
|
||||
#if defined(Q_OS_BSD4)
|
||||
# if defined(Q_OS_NETBSD)
|
||||
struct statvfs *stat_buf;
|
||||
# else
|
||||
struct statfs *stat_buf;
|
||||
# endif
|
||||
int entryCount;
|
||||
int currentIndex;
|
||||
#elif defined(Q_OS_SOLARIS)
|
||||
@ -206,7 +210,7 @@ inline bool QStorageIterator::isValid() const
|
||||
|
||||
inline bool QStorageIterator::next()
|
||||
{
|
||||
return ::getmntent(fp, &mnt) == Q_NULLPTR;
|
||||
return ::getmntent(fp, &mnt) == 0;
|
||||
}
|
||||
|
||||
inline QString QStorageIterator::rootPath() const
|
||||
|
Loading…
x
Reference in New Issue
Block a user