diff options
| author | jeanm <none@none> | 2006-09-29 10:05:43 -0700 |
|---|---|---|
| committer | jeanm <none@none> | 2006-09-29 10:05:43 -0700 |
| commit | f2fa366a878dc4913b5f87b617e6cb4198b91052 (patch) | |
| tree | 37fe9f11feb578b4a444d3bfaff3f9608e300ef7 /usr | |
| parent | 277936f082a70e4065d3d52bf06decb9ab667ad4 (diff) | |
| download | illumos-joyent-f2fa366a878dc4913b5f87b617e6cb4198b91052.tar.gz | |
6179693 libscf has erroneous comments
6353416 scf_entry_add_value() should return an error instead of asserting
6370945 svccfg rejects 33-bit counts
Diffstat (limited to 'usr')
| -rw-r--r-- | usr/src/cmd/svc/configd/client.c | 8 | ||||
| -rw-r--r-- | usr/src/lib/libscf/common/lowlevel.c | 11 |
2 files changed, 10 insertions, 9 deletions
diff --git a/usr/src/cmd/svc/configd/client.c b/usr/src/cmd/svc/configd/client.c index 72aa30d12e..840e36f64a 100644 --- a/usr/src/cmd/svc/configd/client.c +++ b/usr/src/cmd/svc/configd/client.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. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -991,7 +990,6 @@ entity_reset(repcache_client_t *cp, struct rep_protocol_entity_reset *rpr) * _BACKEND_ACCESS * _BACKEND_READONLY * _EXISTS - child already exists - * _NOT_FOUND - could not allocate new id */ static int entity_create_child(repcache_client_t *cp, diff --git a/usr/src/lib/libscf/common/lowlevel.c b/usr/src/lib/libscf/common/lowlevel.c index 3223c05d7a..198603f084 100644 --- a/usr/src/lib/libscf/common/lowlevel.c +++ b/usr/src/lib/libscf/common/lowlevel.c @@ -1823,7 +1823,6 @@ datael_get_child(const scf_datael_t *dp, const char *name, uint32_t type, * _PERMISSION_DENIED * _BACKEND_ACCESS * _BACKEND_READONLY - * _NOT_FOUND - could not allocate new id */ static int datael_add_child(const scf_datael_t *dp, const char *name, uint32_t type, @@ -4025,7 +4024,11 @@ scf_entry_add_value(scf_transaction_entry_t *entry, scf_value_t *v) (void) pthread_mutex_unlock(&h->rh_lock); return (scf_set_error(SCF_ERROR_NOT_SET)); } - assert(entry->entry_state == ENTRY_STATE_IN_TX_ACTION); + + if (entry->entry_state != ENTRY_STATE_IN_TX_ACTION) { + (void) pthread_mutex_unlock(&h->rh_lock); + return (scf_set_error(SCF_ERROR_INTERNAL)); + } if (entry->entry_tx->tran_state != TRAN_STATE_SETUP) { (void) pthread_mutex_unlock(&h->rh_lock); @@ -4622,7 +4625,7 @@ scf_value_set_from_string(scf_value_t *v, scf_type_t type, const char *str) char *endp; errno = 0; - c = strtoul(str, &endp, 0); + c = strtoull(str, &endp, 0); if (errno != 0 || endp == str || *endp != '\0') goto bad; @@ -4636,7 +4639,7 @@ scf_value_set_from_string(scf_value_t *v, scf_type_t type, const char *str) char *endp; errno = 0; - i = strtol(str, &endp, 0); + i = strtoll(str, &endp, 0); if (errno != 0 || endp == str || *endp != '\0') goto bad; |
