getzonenamebyid(3c) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

getzonenamebyid(3c)

getzoneid(3C)            Standard C Library Functions            getzoneid(3C)

NAME
       getzoneid,  getzoneidbyname, getzonenamebyid -  map between zone id and
       name

SYNOPSIS
       #include <zone.h>

       zoneid_t getzoneid(void);


       zoneid_t getzoneidbyname(const char *name);


       ssize_t getzonenamebyid(zoneid_t id, char *buf, size_t buflen);

DESCRIPTION
       The getzoneid() function returns the zone ID of the calling process.


       The getzoneidbyname() function returns the zone ID corresponding to the
       named zone, if that zone is currently active.  If  name  is  NULL,  the
       function returns the zone ID of the calling process.


       The  getzonenamebyid()  function  stores  the  name of the zone with ID
       specified by id in the location specified by buf. The  buflen  argument
       specifies  the  size in bytes of the buffer. If the buffer is too small
       to hold the complete null-terminated name, the first  buflen  bytes  of
       the  name  are stored in the buffer. A buffer of size {ZONENAME_MAX} is
       sufficient to hold any zone name. If buf is NULL or buflen  is  0,  the
       name is not copied into the buffer.


       From  a solaris-kz brand zone, the returned ID will be 0, equivalent to
       a global zone, rather than the ID visible from the host global zone.

RETURN VALUES
       On successful completion, getzoneid() and  getzoneidbyname()  return  a
       non-negative  zone ID. Otherwise, getzoneidbyname() returns −1 and sets
       errno to indicate the error.


       On successful completion, the getzonenamebyid()  function  returns  the
       buffer  size required to hold the full null-terminated name. Otherwise,
       it returns −1 and sets errno to indicate the error.

ERRORS
       The getzoneidbyname() function will fail if:

       EFAULT          The name argument is non-null and points to an  illegal
                       address.


       EINVAL          A zone with the indicated name is not active.


       ENAMETOOLONG    The length of the name argument exceeds {ZONENAME_MAX}.



       The getzonenamebyid() function will fail if:

       EINVAL    A zone with the specified ID is not active.


       EFAULT    The buf argument points to an illegal address.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:

       tab()  box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
       TRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelSafe


SEE ALSO
       chroot(2), Intro(2), malloc(3C), attributes(7), zones(7)

Oracle Solaris 11.4               17 Aug 2018                    getzoneid(3C)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3