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
ae0bd671
Commit
ae0bd671
authored
Dec 28, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MTP: use vlc_strerror() & vlc_strerror_c()
parent
279f97ec
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
modules/access/mtp.c
modules/access/mtp.c
+11
-8
No files found.
modules/access/mtp.c
View file @
ae0bd671
...
...
@@ -166,8 +166,8 @@ static void Close( vlc_object_t * p_this )
close
(
p_sys
->
fd
);
if
(
vlc_unlink
(
p_access
->
psz_filepath
)
!=
0
)
msg_Err
(
p_access
,
"Error deleting file %s, %
m
"
,
p_access
->
psz_filepath
);
msg_Err
(
p_access
,
"Error deleting file %s, %
s
"
,
p_access
->
psz_filepath
,
vlc_strerror_c
(
errno
)
);
free
(
p_sys
);
}
...
...
@@ -191,9 +191,10 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
break
;
default:
msg_Err
(
p_access
,
"read failed (%m)"
);
dialog_Fatal
(
p_access
,
_
(
"File reading failed"
),
"%s (%m)"
,
_
(
"VLC could not read the file."
)
);
msg_Err
(
p_access
,
"read failed: %s"
,
vlc_strerror_c
(
errno
)
);
dialog_Fatal
(
p_access
,
_
(
"File reading failed"
),
_
(
"VLC could not read the file: %s"
),
vlc_strerror
(
errno
)
);
p_access
->
info
.
b_eof
=
true
;
return
0
;
}
...
...
@@ -248,7 +249,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
struct
stat
st
;
if
(
fstat
(
sys
->
fd
,
&
st
)
)
{
msg_Err
(
p_access
,
"fstat error: %
m"
);
msg_Err
(
p_access
,
"fstat error: %
s"
,
vlc_strerror_c
(
errno
)
);
return
VLC_EGENERIC
;
}
*
s
=
st
.
st_size
;
...
...
@@ -280,9 +281,11 @@ static int open_file( access_t *p_access, const char *path )
int
fd
=
vlc_open
(
path
,
O_RDONLY
|
O_NONBLOCK
);
if
(
fd
==
-
1
)
{
msg_Err
(
p_access
,
"cannot open file %s (%m)"
,
path
);
msg_Err
(
p_access
,
"cannot open file %s: %s"
,
path
,
vlc_strerror_c
(
errno
)
);
dialog_Fatal
(
p_access
,
_
(
"File reading failed"
),
_
(
"VLC could not open the file
\"
%s
\"
. (%m)"
),
path
);
_
(
"VLC could not open the file
\"
%s
\"
: %s"
),
path
,
vlc_strerror
(
errno
)
);
return
-
1
;
}
#ifdef F_RDAHEAD
...
...
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