From 2695f72652956e94e24611539579e7ff7899811e Mon Sep 17 00:00:00 2001 From: erik Date: Fri, 09 Feb 2007 21:12:35 +0000 Subject: This commit fixes an issue where an ioctl call is made but the return value is not checked. It isn't a big deal. But it would be nice if the user knew that an ioctl to a device tanked. --- (limited to 'libopie2/opiecore/device/odevice_htc.cpp') diff --git a/libopie2/opiecore/device/odevice_htc.cpp b/libopie2/opiecore/device/odevice_htc.cpp index 44b33c0..7f82369 100644 --- a/libopie2/opiecore/device/odevice_htc.cpp +++ b/libopie2/opiecore/device/odevice_htc.cpp @@ -306,7 +306,9 @@ void HTC::buzzer( int sound ) int fd = ::open ( "/dev/sharp_buz", O_WRONLY|O_NONBLOCK ); if ( fd >= 0 ) { - ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound ); + if (::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound ) == -1) + qWarning( "HTC::buzzer() - Couldn't make the buzzer buzz (%s)", + strerror( errno ) ); ::close ( fd ); } -- cgit v0.9.0.2