2 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH GETDEVICERANGE 3TSOL "Jul 20, 2007"
8 getdevicerange \- get the label range of a device
12 \fBcc\fR [\fIflag\fR...] \fIfile\fR... \fB-lbsm\fR \fB-ltsol\fR [\fIlibrary\fR...]
17 #include <tsol/label.h>
19 \fBblrange_t *\fR\fBgetdevicerange\fR(\fBconst char *\fR\fIdevice\fR);
25 The \fBgetdevicerange()\fR function returns the label range of a
26 user-allocatable device.
29 If the label range is not specified for \fIdevice\fR, \fBgetdevicerange()\fR
30 returns the default values of \fBADMIN_LOW\fR for the lower bound and
31 \fBADMIN_HIGH\fR for the upper bound of \fIdevice\fR.
34 From the command line, \fBlist_devices\fR(1) can be used to see the label range
39 The \fBgetdevicerange()\fR function returns \fINULL\fR on failure and sets
40 \fIerrno\fR. On successful completion, it returns a pointer to a
41 \fBblrange_t\fR structure which must be freed by the caller, as follows:
47 m_label_free(range->lower_bound);
48 m_label_free(range->upper_bound);
57 The \fBgetdevicerange()\fR function will fail if:
64 There is not enough memory available to allocate the required bytes. The
65 application could try later.
74 The physical limits of the system are exceeded by size bytes of memory which
84 Invalid upper or lower bound for device.
90 See \fBattributes\fR(5) for descriptions of the following attributes:
98 ATTRIBUTE TYPE ATTRIBUTE VALUE
100 Interface Stability Committed
108 \fBlist_devices\fR(1), \fBfree\fR(3C), \fBlibtsol\fR(3LIB),
109 \fBm_label_free\fR(3TSOL), \fBattributes\fR(5)
112 \fIValidating the Label Request Against the Printer\&'s Label Range\fR in
113 \fISolaris Trusted Extensions Developer\&'s Guide\fR
117 The functionality described on this manual page is available only if the system
118 is configured with Trusted Extensions.