From 7958ce62d6ae127ee9b8664c8afae5754063389f Mon Sep 17 00:00:00 2001 From: Daniel Caujolle-Bert Date: Fri, 5 Dec 2003 15:54:56 +0000 Subject: cleanup phase II. use xprintf when it's relevant, use xine_xmalloc when it's relevant too. Small other little fix (can't remember). Change few internal function prototype because it xine_t pointer need to be used if some xine's internal sections. NOTE: libdvd{nav,read} is still too noisy, i will take a look to made it quit, without invasive changes. To be continued... CVS patchset: 5844 CVS date: 2003/12/05 15:54:56 --- src/input/media_helper.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/input/media_helper.c') diff --git a/src/input/media_helper.c b/src/input/media_helper.c index ce8f0d701..86a456b3a 100644 --- a/src/input/media_helper.c +++ b/src/input/media_helper.c @@ -79,7 +79,7 @@ static int media_umount_media(const char *device) #endif /* WIN32 */ } -int media_eject_media (const char *device) { +int media_eject_media (xine_t *xine, const char *device) { #ifndef WIN32 int ret, status; @@ -127,10 +127,10 @@ int media_eject_media (const char *device) { #elif defined (__NetBSD__) || defined (__OpenBSD__) || defined (__FreeBSD__) if (ioctl(fd, CDIOCALLOW) == -1) { - perror("ioctl(cdromallow)"); + xprintf(xine, XINE_VERBOSITY_DEBUG, "ioctl(cdromallow): %s\n", strerror(errno)); } else { if (ioctl(fd, CDIOCEJECT) == -1) { - perror("ioctl(cdromeject)"); + xprintf(xine, XINE_VERBOSITY_DEBUG, "ioctl(cdromeject): %s\n", strerror(errno)); } } @@ -138,7 +138,8 @@ int media_eject_media (const char *device) { close(fd); } else { - printf("input_dvd: Device %s failed to open during eject calls\n",device); + xprintf(xine, XINE_VERBOSITY_LOG, + _("input_dvd: Device %s failed to open during eject calls\n"), device); } return 1; #else -- cgit v1.2.3