1d91236feSeschrock#!/usr/local/bin/perl 2d91236feSeschrock# 3d91236feSeschrock# CDDL HEADER START 4d91236feSeschrock# 5d91236feSeschrock# The contents of this file are subject to the terms of the 6d91236feSeschrock# Common Development and Distribution License (the "License"). 7d91236feSeschrock# You may not use this file except in compliance with the License. 8d91236feSeschrock# 9d91236feSeschrock# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10d91236feSeschrock# or http://www.opensolaris.org/os/licensing. 11d91236feSeschrock# See the License for the specific language governing permissions 12d91236feSeschrock# and limitations under the License. 13d91236feSeschrock# 14d91236feSeschrock# When distributing Covered Code, include this CDDL HEADER in each 15d91236feSeschrock# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16d91236feSeschrock# If applicable, add the following below this CDDL HEADER, with the 17d91236feSeschrock# fields enclosed by brackets "[]" replaced with your own identifying 18d91236feSeschrock# information: Portions Copyright [yyyy] [name of copyright owner] 19d91236feSeschrock# 20d91236feSeschrock# CDDL HEADER END 21d91236feSeschrock# 22d91236feSeschrock# 23d91236feSeschrock# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24d91236feSeschrock# Use is subject to license terms. 25d91236feSeschrock# 26d91236feSeschrock 27d91236feSeschrock$num_bays = 4; 28d91236feSeschrock$bay_label = "HD"; 29d91236feSeschrock 30d91236feSeschrockprint <<EOF; 31d91236feSeschrock<topology name='disk' scheme='hc'> 32d91236feSeschrock <range name='bay' min='0' max='3'> 33d91236feSeschrockEOF 34d91236feSeschrock 35d91236feSeschrock$controller = 0; 36d91236feSeschrockfor ($bay = 0; $bay < $num_bays; $bay++) { 37d91236feSeschrock $hpath = "/pci\@7b,0/pci1022,7458\@11/pci1000,3060\@2"; 38d91236feSeschrock $tpath = sprintf("/sd\@%x,0", $bay); 39d91236feSeschrock $apoint = sprintf(":scsi::dsk/c%dt%dd0", 40d91236feSeschrock $controller + 1, $bay); 41d91236feSeschrock 42d91236feSeschrock print <<EOF; 43d91236feSeschrock <node instance='$bay'> 44d91236feSeschrock <propgroup name='protocol' version='1' name-stability='Private' 45d91236feSeschrock data-stability='Private'> 46d91236feSeschrock <propval name='label' type='string' value='$bay_label$bay' /> 47d91236feSeschrock </propgroup> 48d91236feSeschrock <propgroup name='io' version='1' name-stability='Private' 49d91236feSeschrock data-stability='Private'> 50d91236feSeschrock <propval name='ap-path' type='string' value='/devices$hpath$apoint' /> 51d91236feSeschrock </propgroup> 52d91236feSeschrock <propgroup name='binding' version='1' name-stability='Private' 53d91236feSeschrock data-stability='Private'> 54*1da57d55SToomas Soome <propval name='occupant-path' type='string' 55d91236feSeschrock value='$hpath$tpath' /> 56d91236feSeschrock </propgroup> 57d91236feSeschrock </node> 58d91236feSeschrockEOF 59d91236feSeschrock} 60d91236feSeschrock 61d91236feSeschrockprint <<EOF; 62d91236feSeschrock <dependents grouping='children'> 63d91236feSeschrock <range name='disk' min='0' max='0'> 64d91236feSeschrock <enum-method name='disk' version='1' /> 65d91236feSeschrock </range> 66d91236feSeschrock </dependents> 67d91236feSeschrock </range> 68d91236feSeschrock</topology> 69d91236feSeschrockEOF 70