mirror of https://github.com/mpv-player/mpv
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
This commit is contained in:
parent
2895f54f52
commit
1ef79e9f00
|
@ -8,6 +8,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
//#include <string.h> // FIXME: conflicts with fs.h
|
//#include <string.h> // FIXME: conflicts with fs.h
|
||||||
|
#include <errno.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -76,7 +77,6 @@ int descrambling=0;
|
||||||
*/
|
*/
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
#ifndef FIBMAP
|
#ifndef FIBMAP
|
||||||
#define FIBMAP 1
|
#define FIBMAP 1
|
||||||
|
@ -185,7 +185,8 @@ int dvd_auth ( char *dev , char *filename )
|
||||||
DVDHandle dvd; /* DVD device handle */
|
DVDHandle dvd; /* DVD device handle */
|
||||||
|
|
||||||
if ((dvd=DVDOpenDevice(dev)) == DVDOpenFailed) {
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue