Diffusion KIO d025ed9bfe4d

[FileProtocol] change statx stat_dev() to return makedev(major, minor)

Authored by ahmadsamir on Mar 31 2020, 4:47 PM.


[FileProtocol] change statx stat_dev() to return makedev(major, minor)

On Linux systems that have statx available, stat_dev() returned
stx_dev_major, which could be the same value for different partitions.
Change it to return makedev(stx_dev_major, stx_dev_minor) to get a unique
ID (meaning a unique UDSEntry::UDS_DEVICE_ID).

Add a unit test to check that UDS_DEVICE_ID is unique for each individual

Test Plan:
$ stat /usr/bin/file | grep Device
Device: 804h/2052d Inode: 9168 Links: 1
$ stat ~/.bashrc | grep Device
Device: 803h/2051d Inode: 97 Links: 1

Run jobtest unit test and check the debug output from statDetailsWithInode.

Reviewers: Frameworks, dfaure, meven, bruns

Reviewed By: meven

Subscribers: kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D28478