Project

General

Profile

Actions

Bug #16553

open

want makedev variant for full 32-bit dev_t

Added by Robert Mustacchi 15 days ago. Updated 1 day ago.

Status:
New
Priority:
Normal
Category:
lib - userland libraries
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

<sys/mkdev.h> provides the makedev() macro which takes one to the underlying, private __makedev function. In LP64 environments you get the full 64-bit dev_t construction from this function. However, 32-bit environments will use the SVR4 style values. The 15-bit version is also accessible. What doesn't exist is a way for the 64-bit process to construct a dev_t that is compatible with a 32-bit process.

Normally this wouldn't be too relevant, but the file system ID is basically the 32-bit version of the device ID that is accessible via statvfs(2). This means if you're trying to compose or decompse a dev_t from that it can be impossible to match. For example, if you use getmntent(2) and want to transform its major and minor into the fsid from statvfs(2), that'll be impossible.

To support doing this kind of matching for #16076, this adds an additional variant that always outputs the 32-bit compatible form.


Related issues

Related to illumos gate - Feature #16076: pwdx should work on core filesNewRobert Mustacchi

Actions
Actions #1

Updated by Electric Monk 15 days ago

  • Gerrit CR set to 3474
Actions #2

Updated by Gordon Ross 14 days ago

  • Description updated (diff)
Actions #3

Updated by Joshua M. Clulow 14 days ago

Actions #4

Updated by Robert Mustacchi 7 days ago

I've tested this in conjunction with #16706 which leverages this functionality for matching purposes.

Actions #5

Updated by Robert Mustacchi 1 day ago

I also had help from Jonathan Perkin and Dominik Hassler who performed OmniOS and pkgsrc bulk builds on this to help verify that we didn't cause any regressions with the namespace addition that this added.

Actions

Also available in: Atom PDF