Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
a5aed8a3
Commit
a5aed8a3
authored
Nov 25, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
intf_Eject: remove unused MacOS support
parent
fd1b32a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
45 deletions
+1
-45
src/interface/intf_eject.c
src/interface/intf_eject.c
+1
-45
No files found.
src/interface/intf_eject.c
View file @
a5aed8a3
...
...
@@ -125,51 +125,7 @@ int intf_Eject( vlc_object_t *p_this, const char *psz_device )
{
VLC_UNUSED
(
p_this
);
#ifdef __APPLE__
FILE
*
p_eject
;
char
*
psz_disk
;
char
sz_cmd
[
32
];
int
i_ret
;
/*
* The only way to cleanly unmount the disc under MacOS X
* is to use the 'disktool' command line utility. It uses
* the non-public Disk Arbitration API, which can not be
* used by Cocoa or Carbon applications.
*/
if
(
(
psz_disk
=
(
char
*
)
strstr
(
psz_device
,
"disk"
)
)
!=
NULL
&&
strlen
(
psz_disk
)
>
4
)
{
#define EJECT_CMD "/usr/sbin/disktool -e %s 0"
snprintf
(
sz_cmd
,
sizeof
(
sz_cmd
),
EJECT_CMD
,
psz_disk
);
#undef EJECT_CMD
if
(
(
p_eject
=
popen
(
sz_cmd
,
"r"
)
)
!=
NULL
)
{
char
psz_result
[
0x200
];
i_ret
=
fread
(
psz_result
,
1
,
sizeof
(
psz_result
)
-
1
,
p_eject
);
if
(
i_ret
==
0
&&
ferror
(
p_eject
)
!=
0
)
{
pclose
(
p_eject
);
return
VLC_EGENERIC
;
}
pclose
(
p_eject
);
psz_result
[
i_ret
]
=
0
;
if
(
strstr
(
psz_result
,
"Disk Ejected"
)
!=
NULL
)
{
return
VLC_SUCCESS
;
}
}
}
return
VLC_EGENERIC
;
#elif defined(WIN32)
#if defined(WIN32)
MCI_OPEN_PARMS
op
;
DWORD
i_flags
;
char
psz_drive
[
4
];
...
...
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