summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authordnielsen <none@none>2006-08-17 12:56:42 -0700
committerdnielsen <none@none>2006-08-17 12:56:42 -0700
commit09300c80acaa63e6014b47c990368f7a81638c0d (patch)
tree65d0cf6729254f2aa3f52bdd5c91fbe8f1638d9d /usr/src
parentc0e3f49ac0b4f11393ded2ed1fdf519a0b57c098 (diff)
downloadillumos-joyent-09300c80acaa63e6014b47c990368f7a81638c0d.tar.gz
6455580 Error message: ioctl to scf driver failed on retry limit
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/oplhpd/scf_notify.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/usr/src/cmd/oplhpd/scf_notify.c b/usr/src/cmd/oplhpd/scf_notify.c
index 7605c9dbe6..278ba08cfc 100644
--- a/usr/src/cmd/oplhpd/scf_notify.c
+++ b/usr/src/cmd/oplhpd/scf_notify.c
@@ -502,22 +502,16 @@ notify_scf_of_hotplug(sysevent_t *ev)
}
while (ioctl(fd, SCFIOCSETPHPINFO, scfdata) < 0) {
- /* Check Retry Error Number */
- if ((errno != EBUSY) && (errno != EIO)) {
- break;
+ /* retry a few times for EBUSY and EIO */
+ if ((++retry <= SCFRETRY) &&
+ ((errno == EBUSY) || (errno == EIO))) {
+ (void) sleep(SCFIOCWAIT);
+ continue;
}
- /* Check Retry Times */
- if (++retry > SCFRETRY) {
- break;
- }
-
- (void) sleep(SCFIOCWAIT);
- }
-
- if ((errno != EBUSY && errno != EIO) || retry > SCFRETRY) {
- syslog(LOG_ERR, "ioctl to scf driver failed on retry "
- "limit.\n");
+ syslog(LOG_ERR, "SCFIOCSETPHPINFO failed: %s.",
+ strerror(errno));
+ break;
}
(void) close(fd);