]> git.proxmox.com Git - pve-common.git/commit - src/PVE/Tools.pm
tools: add dev_t_major/minor
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 4 Feb 2019 09:42:03 +0000 (10:42 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 4 Feb 2019 10:36:35 +0000 (11:36 +0100)
commit243c4e5892e34d902ff6e9e65d01e8912430dea1
treeb8ded2e21c4a18ed091f72591af838b5db76c4c7
parentcee0e23ac07c6066aee921ff1ae780b2a21f4b03
tools: add dev_t_major/minor

Extract major/minor from `dev_t` values as found in stat()
calls, with support for the full 32 bit values.

The device value returned by stat() is 32 bits long and encoded as
high 12 bit of the minor value as in the 12 MSBs, 12 bit major value,
then the low 8 bit of the minor value in the low byte.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/PVE/Tools.pm