Print this page
4023 - Typo in file(1) manpage and various others
   1 '\" te
   2 .\" Copyright (c) 2004, Sun Microsystems, Inc.
   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 TSALARM 7D "Mar 16, 2004"
   7 .SH NAME
   8 tsalarm \- Alarm device driver
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 tsalarm@0:ctl
  13 .fi
  14 
  15 .SH DESCRIPTION
  16 .sp
  17 .LP
  18 The \fBtsalarm\fR driver is a Multi-threaded, loadable non-STREAMS pseudo
  19 driver that manages ALOM alarms. The \fBtsalarm\fR driver provides an interface
  20 through which alarm relays can be controlled on SUNW,Netra-240 and
  21 SUNW,Netra-440 platforms.
  22 .SH HARDWARE INTERFACE
  23 .sp
  24 .LP
  25 The alarm hardware differs depending on platform. The Netra 240 and 440
  26 platforms features four dry contact alarm relays       which are controlled by


 193 .SH EXAMPLES
 194 .sp
 195 .in +2
 196 .nf
 197 How to set an alarm:
 198 
 199      #include <sys/unistd.h>
 200      #include <fcntl.h>
 201      #include <stdio.h>
 202      #include <lom_io.h>
 203 
 204      #define LOM_DEVICE "/dev/lom"
 205 
 206      int
 207      main()
 208      {
 209         lom_aldata_t lld;
 210         int fd = open(LOM_DEVICE, O_RDWR);
 211 
 212         if (fd == -1) {
 213                 printf("Error opening device: %s\n", LOM_DEVICE);
 214                 exit (1);
 215         }
 216 
 217         lld.alarm_no = ALARM_CRITICAL;   /* Set the critical alarm */
 218         lld.state = ALARM_ON;   /* Set the alarm */
 219 
 220         if (ioctl(fd, LOMIOCALCTL, (char *)&lld) != 0)
 221                 printf("Setting alarm failed");
 222         else
 223                 printf("Alarm set successfully");
 224 
 225         close(fd);
 226 
 227      }
 228 .fi
 229 .in -2
 230 
 231 .SH FILES
 232 .sp
 233 .ne 2


   1 '\" te
   2 .\" Copyright (c) 2004, Sun Microsystems, Inc.
   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 TSALARM 7D "Sep 10, 2013"
   7 .SH NAME
   8 tsalarm \- Alarm device driver
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 tsalarm@0:ctl
  13 .fi
  14 
  15 .SH DESCRIPTION
  16 .sp
  17 .LP
  18 The \fBtsalarm\fR driver is a Multi-threaded, loadable non-STREAMS pseudo
  19 driver that manages ALOM alarms. The \fBtsalarm\fR driver provides an interface
  20 through which alarm relays can be controlled on SUNW,Netra-240 and
  21 SUNW,Netra-440 platforms.
  22 .SH HARDWARE INTERFACE
  23 .sp
  24 .LP
  25 The alarm hardware differs depending on platform. The Netra 240 and 440
  26 platforms features four dry contact alarm relays       which are controlled by


 193 .SH EXAMPLES
 194 .sp
 195 .in +2
 196 .nf
 197 How to set an alarm:
 198 
 199      #include <sys/unistd.h>
 200      #include <fcntl.h>
 201      #include <stdio.h>
 202      #include <lom_io.h>
 203 
 204      #define LOM_DEVICE "/dev/lom"
 205 
 206      int
 207      main()
 208      {
 209         lom_aldata_t lld;
 210         int fd = open(LOM_DEVICE, O_RDWR);
 211 
 212         if (fd == -1) {
 213                 printf("Error opening device: %s\en", LOM_DEVICE);
 214                 exit (1);
 215         }
 216 
 217         lld.alarm_no = ALARM_CRITICAL;   /* Set the critical alarm */
 218         lld.state = ALARM_ON;   /* Set the alarm */
 219 
 220         if (ioctl(fd, LOMIOCALCTL, (char *)&lld) != 0)
 221                 printf("Setting alarm failed");
 222         else
 223                 printf("Alarm set successfully");
 224 
 225         close(fd);
 226 
 227      }
 228 .fi
 229 .in -2
 230 
 231 .SH FILES
 232 .sp
 233 .ne 2