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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 2N/A * libfmd_agent contains the low-level operations that needed by the fmd 2N/A * Some operations are implemented by /dev/fm ioctls. Those ioctls are 2N/A * heavily versioned to allow userland patching without requiring a reboot 2N/A * to get a matched /dev/fm. All the ioctls use packed nvlist to interact 2N/A * between userland and kernel. (see fmd_agent_nvl_ioctl()). 2N/A * Perform /dev/fm ioctl. The input and output data are represented by 2N/A * name-value lists (nvlists). 2N/A * Open /dev/fm and return a handle. ver is the overall interface version. 2N/A return (
NULL);
/* errno is set for us */ 2N/A * Get the individual interface versions. 2N/A * Given a interface name, return the kernel interface version. 2N/A * FM_IOC_PAGE_RETIRE ioctl returns: 2N/A * 0 - success in retiring page 2N/A * -1, errno = EIO - page is already retired 2N/A * -1, errno = EAGAIN - page is scheduled for retirement 2N/A * -1, errno = EINVAL - page fmri is invalid 2N/A * -1, errno = any else - error 2N/A * FM_IOC_PAGE_UNRETIRE ioctl returns: 2N/A * 0 - success in unretiring page 2N/A * -1, errno = EIO - page is already unretired 2N/A * -1, errno = EAGAIN - page couldn't be locked, still retired 2N/A * -1, errno = EINVAL - page fmri is invalid 2N/A * -1, errno = any else - error 2N/A * FM_IOC_PAGE_STATUS returns: 2N/A * 0 - page is retired 2N/A * -1, errno = EAGAIN - page is scheduled for retirement 2N/A * -1, errno = EIO - page not scheduled for retirement 2N/A * -1, errno = EINVAL - page fmri is invalid 2N/A * -1, errno = any else - error