[PATCH] fix bug in front-end ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When someone added the front-end ioctl FE_SET_FRONTEND_TUNE_MODE, they
forgot to set the return value to 0.  It always returns EOPNOTSUPP,
causing problems for programmers who actually check for error conditions.

It's amazing that a bug like this could go so long unnoticed.  Am I
the only programmer who bothers to check if their ioctls() fail?
# HG changeset patch
# User Trent Piepho <xyzzy@xxxxxxxxxxxxx>
# Node ID 64ab788fda07e1acf274833fddd406306d7639cc
# Parent  c009e4653f31ce6c27d0712a50a69a998aec245b
The FE_SET_FRONTEND_TUNE_MODE ioctl always returns EOPNOTSUPP

From: Trent Piepho <xyzzy@xxxxxxxxxxxxx>

When someone added the front-end ioctl FE_SET_FRONTEND_TUNE_MODE, they
forgot to set the return value to 0.  It always returns EOPNOTSUPP,
causing problems for programmers who actually check for error conditions.

Signed-off-by: Trent Piepho <xyzzy@xxxxxxxxxxxxx>

diff -r c009e4653f31 -r 64ab788fda07 linux/drivers/media/dvb/dvb-core/dvb_frontend.c
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c	Wed May 24 10:35:18 2006 -0300
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c	Fri May 26 10:37:39 2006 -0700
@@ -976,6 +976,7 @@ static int dvb_frontend_ioctl(struct ino
 
 	case FE_SET_FRONTEND_TUNE_MODE:
 		fepriv->tune_mode_flags = (unsigned long) parg;
+		err = 0;
 		break;
 	};
 
_______________________________________________

linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux