Module Name: src Committed By: jakllsch Date: Fri May 18 14:01:35 UTC 2012
Modified Files: src/sbin/amrctl: amrctl.c Log Message: Don't exit on ioctl failure, instead let the caller handle it. This is needed so that we can detect failure of the 40LD firmware interface and fall back to the 8LD interface. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sbin/amrctl/amrctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sbin/amrctl/amrctl.c diff -u src/sbin/amrctl/amrctl.c:1.8 src/sbin/amrctl/amrctl.c:1.9 --- src/sbin/amrctl/amrctl.c:1.8 Fri May 18 13:59:23 2012 +++ src/sbin/amrctl/amrctl.c Fri May 18 14:01:34 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: amrctl.c,v 1.8 2012/05/18 13:59:23 jakllsch Exp $ */ +/* $NetBSD: amrctl.c,v 1.9 2012/05/18 14:01:34 jakllsch Exp $ */ /*- * Copyright (c) 2002, Pierre David <pierre.da...@crc.u-strasbg.fr> @@ -29,7 +29,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: amrctl.c,v 1.8 2012/05/18 13:59:23 jakllsch Exp $"); +__RCSID("$NetBSD: amrctl.c,v 1.9 2012/05/18 14:01:34 jakllsch Exp $"); #endif #include <stdio.h> @@ -178,7 +178,8 @@ amr_ioctl_enquiry(int fd, uint8_t cmd, u r = ioctl(fd, AMR_IO_COMMAND, &am); if (r == -1) { if (errno != EBUSY) { - err(EXIT_FAILURE, "ioctl enquiry"); + warn("ioctl enquiry"); + return -1; } else usleep(sleeptime); }