diff options
author | jkeil <jkeil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-08-14 12:17:38 +0000 |
---|---|---|
committer | jkeil <jkeil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-08-14 12:17:38 +0000 |
commit | 1ef79e9f0007c34373df62e73ff3825ca9e91e5d (patch) | |
tree | 794b8bbd31eae308f3aac67d0db5522bb4fd83e3 /dvdauth.c | |
parent | 2895f54f523e426d3f777d5763e17dbb7c3b501f (diff) | |
download | mpv-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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; } |