Print this page
4023 - Typo in file(1) manpage and various others

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man7d/poll.7d
          +++ new/usr/src/man/man7d/poll.7d
   1    1  '\" te
   2    2  .\" Copyright (c) 2007 Sun Microsystems, Inc.  All Rights Reserved.
   3    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    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    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 POLL 7D "Mar 28, 2007"
        6 +.TH POLL 7D "Sep 10, 2013"
   7    7  .SH NAME
   8    8  poll \- driver for fast poll on many file descriptors
   9    9  .SH SYNOPSIS
  10   10  .LP
  11   11  .nf
  12   12  \fB#include <sys/devpoll.h>
  13   13  int fd = open("/dev/poll", O_RDWR);
  14   14  ssize_t n = write(int fd, struct pollfd buf[], int bufsize);
  15   15  int n = ioctl(int fd, DP_POLL, struct dvpoll* arg);
  16   16  int n = ioctl(int fd, DP_ISPOLLED, struct pollfd* pfd);\fR
↓ open down ↓ 224 lines elided ↑ open up ↑
 241  241                          free(pollfd);
 242  242                          error = 1;
 243  243                          goto out1;
 244  244                  }
 245  245                  dpfd.fd = fds[rn];
 246  246                  dpfd.events = 0;
 247  247                  dpfd.revents = 0;
 248  248                  result = ioctl(wfd, DP_ISPOLLED, &dpfd);
 249  249                  if (result < 0) {
 250  250                          perror("/dev/poll ioctl DP_ISPOLLED failed");
 251      -                        printf("errno = %d\n", errno);
      251 +                        printf("errno = %d\en", errno);
 252  252                          close (wfd);
 253  253                          free(pollfd);
 254  254                          error = 1;
 255  255                          goto out1;
 256  256                  }
 257  257                  if (result != 1) {
 258      -                        printf("DP_ISPOLLED returned incorrect result: %d.\n",
      258 +                        printf("DP_ISPOLLED returned incorrect result: %d.\en",
 259  259                                  result);
 260  260                          close (wfd);
 261  261                          free(pollfd);
 262  262                          error = 1;
 263  263                          goto out1;
 264  264                  }
 265  265                  if (dpfd.fd != fds[rn]) {
 266      -                        printf("DP_ISPOLLED returned wrong fd %d, expect %d\n",
      266 +                        printf("DP_ISPOLLED returned wrong fd %d, expect %d\en",
 267  267                                  dpfd.fd, fds[rn]);
 268  268                          close (wfd);
 269  269                          free(pollfd);
 270  270                          error = 1;
 271  271                          goto out1;
 272  272   }
 273  273                  if (dpfd.revents != POLLIN) {
 274      -                        printf("DP_ISPOLLED returned unexpected revents %d\n",
      274 +                        printf("DP_ISPOLLED returned unexpected revents %d\en",
 275  275                                  dpfd.revents);
 276  276                          close (wfd);
 277  277                          free(pollfd);
 278  278                          error = 1;
 279  279                          goto out1;
 280  280                  }
 281  281                  if (read(dpfd.fd, rbuf, strlen(TESTSTRING)) !=
 282  282                                  strlen(TESTSTRING)) {
 283  283                          perror("read from fifo failed");
 284  284                          close (wfd);
↓ open down ↓ 116 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX