availdevs.c (186d582bd9dbcd38e0aeea49036d47d3426a3536) | availdevs.c (3f9d6ad73e45c6823b409f93b0c8d4f62861d2d5) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 6 unchanged lines hidden (view full) --- 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22/* | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 6 unchanged lines hidden (view full) --- 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22/* |
23 * Copyright 2010 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. | 23 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
25 */ 26 27#include "availdevs.h" 28#include <libzfs.h> 29#include <libzfs_jni_diskmgt.h> 30#include <libzfs_jni_ipool.h> 31#include <libxml/parser.h> 32 --- 96 unchanged lines hidden (view full) --- 129 xmlNodePtr importable = *((xmlNodePtr *)data); 130 131 if (nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME, &name) || 132 nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID, &guid) || 133 nvlist_lookup_uint64(config, ZPOOL_CONFIG_VERSION, &version) || 134 nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_STATE, &state) || 135 nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &devices) || 136 nvlist_lookup_uint64_array( | 24 */ 25 26#include "availdevs.h" 27#include <libzfs.h> 28#include <libzfs_jni_diskmgt.h> 29#include <libzfs_jni_ipool.h> 30#include <libxml/parser.h> 31 --- 96 unchanged lines hidden (view full) --- 128 xmlNodePtr importable = *((xmlNodePtr *)data); 129 130 if (nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME, &name) || 131 nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID, &guid) || 132 nvlist_lookup_uint64(config, ZPOOL_CONFIG_VERSION, &version) || 133 nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_STATE, &state) || 134 nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &devices) || 135 nvlist_lookup_uint64_array( |
137 devices, ZPOOL_CONFIG_STATS, (uint64_t **)&vs, &n)) { | 136 devices, ZPOOL_CONFIG_VDEV_STATS, (uint64_t **)&vs, &n)) { |
138 return (-1); 139 } 140 141 pool = xmlNewChild(importable, NULL, (xmlChar *)ELEMENT_POOL, NULL); 142 (void) xmlSetProp(pool, (xmlChar *)ATTR_POOL_NAME, (xmlChar *)name); 143 144 set_uint64_prop(pool, ATTR_POOL_ID, guid); 145 set_uint64_prop(pool, ATTR_POOL_VERSION, version); --- 116 unchanged lines hidden --- | 137 return (-1); 138 } 139 140 pool = xmlNewChild(importable, NULL, (xmlChar *)ELEMENT_POOL, NULL); 141 (void) xmlSetProp(pool, (xmlChar *)ATTR_POOL_NAME, (xmlChar *)name); 142 143 set_uint64_prop(pool, ATTR_POOL_ID, guid); 144 set_uint64_prop(pool, ATTR_POOL_VERSION, version); --- 116 unchanged lines hidden --- |