summaryrefslogtreecommitdiff
path: root/usr/src/lib/libscf
diff options
context:
space:
mode:
authorJohn Sonnenschein <johns@joyent.com>2012-05-17 18:26:57 +0000
committerJohn Sonnenschein <johns@joyent.com>2012-05-17 18:26:57 +0000
commit04b244dd661c24b510ac22936decfc0972d202d3 (patch)
tree3ebfef98afc303fddf3415d6fba64e8682f495e8 /usr/src/lib/libscf
parenteac250589e41f1b705e1b7427b02b3379aac9f9e (diff)
parenta69187741b83640a90dd8586195456dd50c016a8 (diff)
downloadillumos-joyent-20120517.tar.gz
Merge git.joyent.com:illumos-joyent20120517
Diffstat (limited to 'usr/src/lib/libscf')
-rw-r--r--usr/src/lib/libscf/common/highlevel.c8
-rw-r--r--usr/src/lib/libscf/inc/libscf.h6
2 files changed, 11 insertions, 3 deletions
diff --git a/usr/src/lib/libscf/common/highlevel.c b/usr/src/lib/libscf/common/highlevel.c
index d5ab524d0c..dddd551e51 100644
--- a/usr/src/lib/libscf/common/highlevel.c
+++ b/usr/src/lib/libscf/common/highlevel.c
@@ -159,6 +159,8 @@ scferror:
void
scf_get_boot_config(uint8_t *boot_config)
{
+ uint64_t ret = 0;
+
assert(boot_config);
*boot_config = 0;
@@ -176,7 +178,7 @@ scf_get_boot_config(uint8_t *boot_config)
scf_propvec_t *prop;
for (prop = ua_boot_config; prop->pv_prop != NULL; prop++)
- prop->pv_ptr = boot_config;
+ prop->pv_ptr = &ret;
prop = NULL;
if (scf_read_propvec(FMRI_BOOT_CONFIG, BOOT_CONFIG_PG_PARAMS,
B_TRUE, ua_boot_config, &prop) != SCF_FAILED) {
@@ -187,9 +189,9 @@ scf_get_boot_config(uint8_t *boot_config)
* blacklisted.
*/
if (scf_is_fb_blacklisted())
- *boot_config &= ~(UA_FASTREBOOT_DEFAULT |
- UA_FASTREBOOT_ONPANIC);
+ return;
#endif /* __x86 */
+ *boot_config = (uint8_t)ret;
return;
}
#if defined(FASTREBOOT_DEBUG)
diff --git a/usr/src/lib/libscf/inc/libscf.h b/usr/src/lib/libscf/inc/libscf.h
index 8e68b4dfcc..232fc205e0 100644
--- a/usr/src/lib/libscf/inc/libscf.h
+++ b/usr/src/lib/libscf/inc/libscf.h
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Joyent, Inc. All rights reserved.
*/
#ifndef _LIBSCF_H
@@ -831,8 +832,13 @@ int smf_notify_del_params(const char *, const char *, int32_t);
/*
* SMF exit status definitions
+ *
+ * The SMF_EXIT_NODAEMON exit status should be used when a method does not
+ * need to run any persistent process. This indicates success, abandons the
+ * contract, and allows dependencies to be met.
*/
#define SMF_EXIT_OK 0
+#define SMF_EXIT_NODAEMON 94
#define SMF_EXIT_ERR_FATAL 95
#define SMF_EXIT_ERR_CONFIG 96
#define SMF_EXIT_MON_DEGRADE 97