summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStephen Torri <storri@users.sourceforge.net>2003-09-16 02:15:39 +0000
committerStephen Torri <storri@users.sourceforge.net>2003-09-16 02:15:39 +0000
commit3406e5733c1e0f7995d073684cd32ff619bdd525 (patch)
tree2c157dd6ae011ca2ec3a4fa35501dc889f347ace /src
parent08fcb22dd2f34e1e14e7a9cc214adfd0f958c78c (diff)
downloadxine-lib-3406e5733c1e0f7995d073684cd32ff619bdd525.tar.gz
xine-lib-3406e5733c1e0f7995d073684cd32ff619bdd525.tar.bz2
The code that checked to see that the cdrom and dvdrom drives were
usable by the user were never executed. The condition code to check the drive permissions was never false. The change here uses the access() function to check the permission of the drives. CVS patchset: 5394 CVS date: 2003/09/16 02:15:39
Diffstat (limited to 'src')
-rw-r--r--src/xine-utils/xine_check.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/xine-utils/xine_check.c b/src/xine-utils/xine_check.c
index a018138f6..82e258149 100644
--- a/src/xine-utils/xine_check.c
+++ b/src/xine-utils/xine_check.c
@@ -214,8 +214,11 @@ xine_health_check_t* xine_health_check_cdrom (xine_health_check_t* hc) {
return hc;
}
+ if ( (access (hc->cdrom_dev, R_OK & W_OK & X_OK)) < 0) {
+/*
if ((cdrom_st.st_mode & S_IFMT & S_IRWXU & S_IRWXG & S_IRWXO) !=
(S_IRUSR & S_IXUSR & S_IRGRP & S_IXGRP & S_IROTH & S_IXOTH)) {
+*/
set_hc_result (hc, XINE_HEALTH_CHECK_FAIL, "FAILED - %s permissions are not 'rwxrwxrx'\n.", hc->cdrom_dev);
return hc;
}
@@ -243,8 +246,11 @@ xine_health_check_t* xine_health_check_dvdrom(xine_health_check_t* hc) {
return hc;
}
+ if ( (access (hc->dvd_dev, R_OK & W_OK & X_OK)) < 0) {
+/*
if ((dvdrom_st.st_mode & S_IFMT & S_IRWXU & S_IRWXG & S_IRWXO) !=
(S_IRUSR & S_IXUSR & S_IRGRP & S_IXGRP & S_IROTH & S_IXOTH)) {
+*/
set_hc_result(hc, XINE_HEALTH_CHECK_FAIL, "FAILED - %s permissions are not 'rwxrwxrx'.\n", hc->dvd_dev);
return hc;
}