devattr.c revision 2
2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 2N/A/* All Rights Reserved */ 2N/A * Copyright (c) 1989, 2011, Oracle and/or its affiliates. All rights reserved. 2N/A * char *devattr(device, attr) 2N/A * This is a stubbed implementation of devattr(), which was part of 2N/A * the SVR4 OAM device managment stuff which used to be present in 2N/A * libadm. This satisfies an interface needed by SVR4 packaging. 2N/A * looking for the device specified by <device> and to find specific 2N/A * In this implementation, we emulate a device.tab file in which 2N/A * there is a single line defining "spool"-- the "package spool", 2N/A * device Pointer to the character-string that describes the 2N/A * device whose record is to be looked for 2N/A * attr The device's attribute to be looked for 2N/A * A pointer to the character-string containing the value of the 2N/A * attribute <attr> for the device <device>, or (char *) NULL if none 2N/A * was found. If the function returns (char *) NULL and the error was 2N/A * detected by this function, it sets "errno" to indicate the problem. 2N/A * EPERM Permissions deny reading access of the device-table 2N/A * ENOENT The specified device-table file could not be found 2N/A * ENODEV Device not found in the device table 2N/A * EINVAL The device does not have that attribute defined 2N/A * ENOMEM No memory available 2N/A /* Did they ask for the device alias? */ 2N/A * Alias, cdevice, bdevice, and pathname attrs were never returned as 2N/A * NULL (for no apparent reason). "" was used instead. We stick with 2N/A * the scheme here. Other attributes could return NULL. 2N/A r =
"Packaging Spool Directory";
2N/A /* We don't emulate any other attributes */