Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
565422b6
Commit
565422b6
authored
Feb 15, 2012
by
Konstantin Pavlov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bluray: try to find mount point if block device file is passed.
parent
a6fdd02e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
configure.ac
configure.ac
+1
-1
modules/access/bluray.c
modules/access/bluray.c
+24
-0
No files found.
configure.ac
View file @
565422b6
...
@@ -707,7 +707,7 @@ AC_CHECK_HEADERS([sys/mount.h], [], [],
...
@@ -707,7 +707,7 @@ AC_CHECK_HEADERS([sys/mount.h], [], [],
if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
AC_CHECK_HEADERS(machine/param.h sys/shm.h)
AC_CHECK_HEADERS(machine/param.h sys/shm.h)
AC_CHECK_HEADERS([linux/version.h linux/dccp.h scsi/scsi.h linux/magic.h])
AC_CHECK_HEADERS([linux/version.h linux/dccp.h scsi/scsi.h linux/magic.h])
AC_CHECK_HEADERS(syslog.h)
AC_CHECK_HEADERS(syslog.h
mntent.h
)
fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
dnl LP64 and LLP64 architectures had better define ssize_t by themselves...
dnl LP64 and LLP64 architectures had better define ssize_t by themselves...
...
...
modules/access/bluray.c
View file @
565422b6
...
@@ -26,6 +26,10 @@
...
@@ -26,6 +26,10 @@
#include <assert.h>
#include <assert.h>
#include <limits.h>
/* PATH_MAX */
#include <limits.h>
/* PATH_MAX */
#if defined (HAVE_MNTENT_H) && defined(HAVE_SYS_STAT_H)
#include <mntent.h>
#include <sys/stat.h>
#endif
#include <vlc_common.h>
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_plugin.h>
...
@@ -122,6 +126,26 @@ static int blurayOpen( vlc_object_t *object )
...
@@ -122,6 +126,26 @@ static int blurayOpen( vlc_object_t *object )
bd_path
[
PATH_MAX
-
1
]
=
'\0'
;
bd_path
[
PATH_MAX
-
1
]
=
'\0'
;
}
}
#if defined (HAVE_MNTENT_H) && defined (HAVE_SYS_STAT_H)
/* If we're passed a block device, try to convert it to the mount point. */
struct
stat
st
;
if
(
!
stat
(
bd_path
,
&
st
))
{
if
(
S_ISBLK
(
st
.
st_mode
))
{
FILE
*
mtab
=
setmntent
(
"/proc/self/mounts"
,
"r"
);
struct
mntent
*
m
;
struct
mntent
mbuf
;
char
buf
[
8192
];
while
((
m
=
getmntent_r
(
mtab
,
&
mbuf
,
buf
,
sizeof
(
buf
)))
!=
NULL
)
{
if
(
!
strcmp
(
m
->
mnt_fsname
,
bd_path
))
{
strncpy
(
bd_path
,
m
->
mnt_dir
,
sizeof
(
bd_path
));
bd_path
[
sizeof
(
bd_path
)
-
1
]
=
'\0'
;
break
;
}
}
endmntent
(
mtab
);
}
}
#endif
/* HAVE_MNTENT_H && HAVE_SYS_STAT_H */
p_sys
->
bluray
=
bd_open
(
bd_path
,
NULL
);
p_sys
->
bluray
=
bd_open
(
bd_path
,
NULL
);
if
(
!
p_sys
->
bluray
)
{
if
(
!
p_sys
->
bluray
)
{
free
(
p_sys
);
free
(
p_sys
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment