The patch number 9071 was added via Steven Toth <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        [EMAIL PROTECTED]

------

From: Steven Toth  <[EMAIL PROTECTED]>
S2API: Implement result codes for individual commands


This allows application developers to determine which particular
command in a sequence is invalid, or failing with error.

Priority: normal

Signed-off-by: Steven Toth <[EMAIL PROTECTED]>


---

 linux/drivers/media/dvb/dvb-core/dvb_frontend.c |   12 ++++++++----
 linux/include/linux/dvb/frontend.h              |    1 +
 2 files changed, 9 insertions(+), 4 deletions(-)

diff -r 9b565a73c300 -r d6452e93bb98 
linux/drivers/media/dvb/dvb-core/dvb_frontend.c
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c   Thu Sep 25 23:04:52 
2008 -0400
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c   Thu Sep 25 23:16:25 
2008 -0400
@@ -1377,8 +1377,10 @@ static int dvb_frontend_ioctl_properties
                        goto out;
                }
 
-               for (i = 0; i < tvps->num; i++)
-                       err |= dtv_property_process_set(fe, tvp + i, inode, 
file);
+               for (i = 0; i < tvps->num; i++) {
+                       (tvp + i)->result = dtv_property_process_set(fe, tvp + 
i, inode, file);
+                       err |= (tvp + i)->result;
+               }
 
                if(fe->dtv_property_cache.state == DTV_TUNE) {
                        printk("%s() Property cache is full, tuning\n", 
__FUNCTION__);
@@ -1410,8 +1412,10 @@ static int dvb_frontend_ioctl_properties
                        goto out;
                }
 
-               for (i = 0; i < tvps->num; i++)
-                       err |= dtv_property_process_get(fe, tvp + i, inode, 
file);
+               for (i = 0; i < tvps->num; i++) {
+                       (tvp + i)->result = dtv_property_process_get(fe, tvp + 
i, inode, file);
+                       err |= (tvp + i)->result;
+               }
 
                if (copy_to_user(tvps->props, tvp, tvps->num * sizeof(struct 
dtv_property))) {
                        err = -EFAULT;
diff -r 9b565a73c300 -r d6452e93bb98 linux/include/linux/dvb/frontend.h
--- a/linux/include/linux/dvb/frontend.h        Thu Sep 25 23:04:52 2008 -0400
+++ b/linux/include/linux/dvb/frontend.h        Thu Sep 25 23:16:25 2008 -0400
@@ -354,6 +354,7 @@ struct dtv_property {
                        void *reserved2;
                } buffer;
        } u;
+       int result;
 } __attribute__ ((packed));
 
 /* No more than 16 properties during any given ioctl */


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/d6452e93bb98a0a37f82788ac2167357a79e7f33

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to