diff options
| author | Roger A. Faulkner <Roger.Faulkner@Oracle.COM> | 2010-08-12 14:55:22 -0700 |
|---|---|---|
| committer | Roger A. Faulkner <Roger.Faulkner@Oracle.COM> | 2010-08-12 14:55:22 -0700 |
| commit | 23a1ccea6aac035f084a7a4cdc968687d1b02daf (patch) | |
| tree | 6ed5e310ce6dd96f997b0c0f9735805d513d898a /usr/src/cmd/devctl/devctl.c | |
| parent | 29c3196fe2acc65721d8b9b5ea708d3a87facde0 (diff) | |
| download | illumos-joyent-23a1ccea6aac035f084a7a4cdc968687d1b02daf.tar.gz | |
PSARC 2010/299 GNU/Linux/BSD compatibility functions
6960818 add get_nprocs(), getline(), strdupa(), strndup() to libc
6901783 strndup would be nice
6824404 libc should provide ffsl() & ffsll()
6793969 RFE: Add|stpcpy|to libc
6735446 Want a __progname symbol for BSD-style source compatibility
6421095 Solaris should provide strcasestr
6275498 Provide string compare functions wcscasecmp,wcsncasecmp in solaris like linux
--HG--
rename : usr/src/lib/libc/port/gen/strcasecmp.c => usr/src/lib/libc/port/gen/ascii_strcasecmp.c
rename : usr/src/lib/libc/port/gen/strncasecmp.c => usr/src/lib/libc/port/gen/ascii_strncasecmp.c
rename : usr/src/lib/libc/sparc/gen/strcasecmp.s => usr/src/lib/libc/sparc/gen/ascii_strcasecmp.s
rename : usr/src/lib/libc/sparcv9/gen/strcasecmp.s => usr/src/lib/libc/sparcv9/gen/ascii_strcasecmp.s
Diffstat (limited to 'usr/src/cmd/devctl/devctl.c')
| -rw-r--r-- | usr/src/cmd/devctl/devctl.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/usr/src/cmd/devctl/devctl.c b/usr/src/cmd/devctl/devctl.c index 5516d51f14..15b76da9ac 100644 --- a/usr/src/cmd/devctl/devctl.c +++ b/usr/src/cmd/devctl/devctl.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,11 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - - /* * devctl - device control utility * @@ -107,7 +103,7 @@ typedef struct cmds { extern int errno; -static void setprogname(char *name); +static void setpname(char *name); static void print_bus_state(char *devname, uint_t state); static void print_dev_state(char *devname, uint_t state); static int dev_getstate(devctl_hdl_t); @@ -191,7 +187,7 @@ main(int argc, char *argv[]) devctl_hdl_t dcp; struct stat stat_buf; - setprogname(argv[0]); + setpname(argv[0]); while ((c = getopt(argc, argv, "vd")) != -1) { switch (c) { case 'v': @@ -255,8 +251,8 @@ main(int argc, char *argv[]) if ((pathlen = readlink(orig_path, devctl_device, MAXPATHLEN)) == -1) { (void) fprintf(stderr, - "devctl: readlink(%s) - %s\n", - orig_path, strerror(errno)); + "devctl: readlink(%s) - %s\n", + orig_path, strerror(errno)); exit(-1); } devctl_device[pathlen] = '\0'; @@ -308,16 +304,16 @@ main(int argc, char *argv[]) dcp = devctl_pm_dev_acquire(devctl_device, 0); if (dcp == NULL) { (void) fprintf(stderr, - "devctl: device_pm_dev_acquire %s - %s\n", - devctl_device, strerror(errno)); + "devctl: device_pm_dev_acquire %s - %s\n", + devctl_device, strerror(errno)); exit(-1); } } else { dcp = devctl_device_acquire(devctl_device, 0); if (dcp == NULL) { (void) fprintf(stderr, - "devctl: device_acquire %s - %s\n", - devctl_device, strerror(errno)); + "devctl: device_acquire %s - %s\n", + devctl_device, strerror(errno)); exit(-1); } } @@ -516,7 +512,7 @@ print_dev_state(char *devname, uint_t state) } static void -setprogname(char *name) +setpname(char *name) { register char *p; |
