/*
* CDDL HEADER START
*
* 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.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* 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]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <libintl.h>
#include <locale.h>
#include <unistd.h>
#include <picl.h>
typedef struct locator_info {
static void
{
exit(1);
}
static int
{
int err;
char *new_state;
if (err != PICL_SUCCESS) {
gettext("picl_get_prop_by_name failed: %s\n"),
picl_strerror(err));
return (err);
}
if (err != PICL_SUCCESS) {
gettext("picl_get_propval failed: %s\n"),
picl_strerror(err));
return (err);
}
if (err != PICL_SUCCESS) {
gettext("picl_get_propinfo failed: %s\n"),
picl_strerror(err));
return (err);
}
if (err != PICL_SUCCESS) {
gettext("picl_set_propval failed: %s\n"),
picl_strerror(err));
return (err);
}
}
return (err);
}
static int
{
char *display_state;
int err;
if (err != PICL_SUCCESS) {
gettext("picl_get_propval_by_name failed: %s\n"),
picl_strerror(err));
return (err);
}
else
return (err);
}
static int
{
int err;
sizeof (is_locator));
if (err != PICL_SUCCESS)
return (PICL_WALK_CONTINUE);
return (PICL_WALK_CONTINUE);
sizeof (name));
if (err == PICL_PROPNOTFOUND)
sizeof (name));
if (err != PICL_SUCCESS)
return (err);
return (PICL_WALK_CONTINUE);
sizeof (locator_on));
if (err == PICL_SUCCESS) {
} else if (err == PICL_PROPNOTFOUND) {
} else {
return (err);
}
sizeof (locator_off));
if (err == PICL_SUCCESS) {
} else if (err == PICL_PROPNOTFOUND) {
} else {
return (err);
}
return (PICL_WALK_TERMINATE);
}
int
{
int err;
int c;
int on_flag = 0;
int off_flag = 0;
char *progname;
(void) textdomain(TEXT_DOMAIN);
else
progname++;
switch (c) {
case 'n':
on_flag++;
break;
case 'f':
off_flag++;
break;
case '?':
/*FALLTHROUGH*/
default:
}
}
/* We only take one option */
err = picl_initialize();
if (err != PICL_SUCCESS) {
picl_strerror(err));
exit(2);
}
if (err != PICL_SUCCESS) {
picl_strerror(err));
err = 2;
goto OUT;
}
if (on_flag) {
} else if (off_flag) {
locator_info.new_state = 0;
} else {
}
if (err != PICL_SUCCESS) {
gettext("picl_walk_tree_by_class failed: %s\n"),
picl_strerror(err));
err = 2;
goto OUT;
}
if (locator_info.found == 0) {
err = 2;
}
err = 2;
OUT:
(void) picl_shutdown();
return (err);
}