Print this page
10080 smatch Makefile changes for usr/src/cmd


   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*
  23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 #pragma ident   "%Z%%M% %I%     %E% SMI"


  28 
  29 #include <stdio.h>

  30 #include <unistd.h>
  31 #include <string.h>
  32 #include <sys/ioctl.h>
  33 #include <sys/prnio.h>
  34 #include <fcntl.h>
  35 
  36 #define COMMAND_SET_MAX 16      /* more than 16 command sets is not likely */
  37 #define NP(x)   (x ? x : "")
  38 
  39 typedef struct {
  40         char *manufacturer;
  41         char *model;
  42         char *description;
  43         char *class;
  44         char *command_set[COMMAND_SET_MAX];
  45 } printer_description_t;
  46 
  47 int
  48 get_printer_description(char *path, printer_description_t *info)
  49 {




   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*
  23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 /*
  28  * Copyright (c) 2018, Joyent, Inc.
  29  */
  30 
  31 #include <stdio.h>
  32 #include <stdlib.h>
  33 #include <unistd.h>
  34 #include <string.h>
  35 #include <sys/ioctl.h>
  36 #include <sys/prnio.h>
  37 #include <fcntl.h>
  38 
  39 #define COMMAND_SET_MAX 16      /* more than 16 command sets is not likely */
  40 #define NP(x)   (x ? x : "")
  41 
  42 typedef struct {
  43         char *manufacturer;
  44         char *model;
  45         char *description;
  46         char *class;
  47         char *command_set[COMMAND_SET_MAX];
  48 } printer_description_t;
  49 
  50 int
  51 get_printer_description(char *path, printer_description_t *info)
  52 {