summaryrefslogtreecommitdiffstats
path: root/dvdauth.c
diff options
context:
space:
mode:
authorjkeil <jkeil@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-08-14 12:17:38 +0000
committerjkeil <jkeil@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-08-14 12:17:38 +0000
commit1ef79e9f0007c34373df62e73ff3825ca9e91e5d (patch)
tree794b8bbd31eae308f3aac67d0db5522bb4fd83e3 /dvdauth.c
parent2895f54f523e426d3f777d5763e17dbb7c3b501f (diff)
downloadmpv-1ef79e9f0007c34373df62e73ff3825ca9e91e5d.tar.bz2
mpv-1ef79e9f0007c34373df62e73ff3825ca9e91e5d.tar.xz
In case the open on the dvd device fails, print some hints based on errno
why the open has failed. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1511 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'dvdauth.c')
-rw-r--r--dvdauth.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dvdauth.c b/dvdauth.c
index 6c02ef1d48..65801d6dda 100644
--- a/dvdauth.c
+++ b/dvdauth.c
@@ -8,6 +8,7 @@
#include <stdio.h>
#include <stdlib.h>
//#include <string.h> // FIXME: conflicts with fs.h
+#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
@@ -76,7 +77,6 @@ int descrambling=0;
*/
#ifdef __linux__
#include <linux/fs.h>
-#include <errno.h>
#ifndef FIBMAP
#define FIBMAP 1
@@ -185,7 +185,8 @@ int dvd_auth ( char *dev , char *filename )
DVDHandle dvd; /* DVD device handle */
if ((dvd=DVDOpenDevice(dev)) == DVDOpenFailed) {
- fprintf(stderr,"DVD: cannot open DVD device \"%s\".\n",dev);
+ fprintf(stderr,"DVD: cannot open DVD device \"%s\": %s.\n",
+ dev, strerror(errno));
return 1;
}