Project

General

Profile

Bug #11060

sys/zone.h exposes more than it should

Added by Gordon Ross 5 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2019-05-22
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

User-level programs that include sys/zone.h (i.e. to get GLOBAL_ZONEID for comparing with the return from getzoneid()) also end up getting a bunch of headers that are neither necessary nor appropriate for a user-level program. This leads to things like the #undef lines added to usr/src/cmd/lp/include/printers.h in #11048

Let's try to clean up symbol exposure from sys/zone.h
This has the potential to break things, of course, so the work will require first attempting to move all the includes that are not appropriate for user-level code down into the ifdef KERNEL section, getting the whole gate to build, and then double-checking some external software (at least any that uses sys/zone.h).

History

#1

Updated by Gordon Ross 5 months ago

  • Status changed from New to In Progress
  • Assignee set to Gordon Ross
#3

Updated by Electric Monk 5 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit b3b3563308068a7fafd98cf3021c73aedc1caa6c

commit  b3b3563308068a7fafd98cf3021c73aedc1caa6c
Author: Gordon Ross <gwr@nexenta.com>
Date:   2019-05-29T22:15:45.000Z

    11060 sys/zone.h exposes more than it should
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: Michal Nowak <mnowak@startmail.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF