Patch from John Wehle:
A side effect of opening the cdrom device on FreeBSD is it locks the drive. This makes cdio_get_media_changed less useful and prevents you from being able to switch disks when using things such as the audacious media player. This patch simply unlocks the drive right after it's opened prior to opening the cam passthrough device.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
$Id: freebsd_cam.c,v 1.12 2008/04/21 18:30:20 karl Exp $
|
||||
|
||||
Copyright (C) 2004, 2005, 2008 Rocky Bernstein <rocky@gnu.org>
|
||||
Copyright (C) 2004, 2005, 2008, 2009 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -122,6 +122,8 @@ init_freebsd_cam (_img_private_t *p_env)
|
||||
return false;
|
||||
}
|
||||
|
||||
(void)ioctl(p_env->gen.fd, CDIOCALLOW);
|
||||
|
||||
if (ioctl (p_env->gen.fd, CAMGETPASSTHRU, &p_env->ccb) < 0)
|
||||
{
|
||||
cdio_warn ("open: %s", strerror (errno));
|
||||
|
||||
Reference in New Issue
Block a user