summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Toth <stoth@linuxtv.org>2008-09-25 23:16:25 -0400
committerSteven Toth <stoth@linuxtv.org>2008-09-25 23:16:25 -0400
commit506cfbf07f4322d8a43fd8bd0055c142db5cf615 (patch)
tree45fd023e63d212e627850dd0cafdb8f4b25f37c0
parentdd77367427f2ae6d28b7038885cb6e4d4a64631a (diff)
downloadmediapointer-dvb-s2-506cfbf07f4322d8a43fd8bd0055c142db5cf615.tar.gz
mediapointer-dvb-s2-506cfbf07f4322d8a43fd8bd0055c142db5cf615.tar.bz2
S2API: Implement result codes for individual commands
From: Steven Toth <stoth@linuxtv.org> 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 <stoth@linuxtv.org>
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c12
-rw-r--r--linux/include/linux/dvb/frontend.h1
2 files changed, 9 insertions, 4 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
index 5c1193524..9f3a61827 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -1377,8 +1377,10 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
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(struct inode *inode, struct file *file,
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 --git a/linux/include/linux/dvb/frontend.h b/linux/include/linux/dvb/frontend.h
index 9c5d64864..ecac80d32 100644
--- a/linux/include/linux/dvb/frontend.h
+++ b/linux/include/linux/dvb/frontend.h
@@ -354,6 +354,7 @@ struct dtv_property {
void *reserved2;
} buffer;
} u;
+ int result;
} __attribute__ ((packed));
/* No more than 16 properties during any given ioctl */