|
Removed
Link Here
|
| 1 |
|
| 2 |
$FreeBSD: ports/sysutils/libcdio/files/patch-lib_driver_FreeBSD_freebsd.c,v 1.1 2008/01/02 13:51:57 mich Exp $ |
| 3 |
|
| 4 |
--- lib/driver/FreeBSD/freebsd.c.orig |
| 5 |
+++ lib/driver/FreeBSD/freebsd.c |
| 6 |
@@ -743,6 +743,27 @@ |
| 7 |
#endif /*HAVE_FREEBSD_CDROM*/ |
| 8 |
} |
| 9 |
|
| 10 |
+/*! Find out if media has changed since the last call. @param |
| 11 |
+ p_user_data the environment of the CD object to be acted upon. |
| 12 |
+ @return 1 if media has changed since last call, 0 if not. Error |
| 13 |
+ return codes are the same as driver_return_code_t |
| 14 |
+ */ |
| 15 |
+int |
| 16 |
+get_media_changed_freebsd (const void *p_user_data) |
| 17 |
+{ |
| 18 |
+#ifdef HAVE_FREEBSD_CDROM |
| 19 |
+ const _img_private_t *p_env = p_user_data; |
| 20 |
+ if ( p_env->access_mode == _AM_CAM ) { |
| 21 |
+ return mmc_get_media_changed( p_env->gen.cdio ); |
| 22 |
+ } |
| 23 |
+ else |
| 24 |
+ return DRIVER_OP_UNSUPPORTED; |
| 25 |
+#else |
| 26 |
+ return DRIVER_OP_NO_DRIVER; |
| 27 |
+#endif /*HAVE_FREEBSD_CDROM*/ |
| 28 |
+} |
| 29 |
+ |
| 30 |
+ |
| 31 |
/*! |
| 32 |
Initialization routine. This is the only thing that doesn't |
| 33 |
get called via a function pointer. In fact *we* are the |
| 34 |
@@ -790,6 +811,7 @@ |
| 35 |
.get_discmode = get_discmode_generic, |
| 36 |
.get_drive_cap = get_drive_cap_freebsd, |
| 37 |
.get_first_track_num = get_first_track_num_generic, |
| 38 |
+ .get_media_changed = get_media_changed_freebsd, |
| 39 |
.get_mcn = get_mcn_freebsd, |
| 40 |
.get_num_tracks = get_num_tracks_generic, |
| 41 |
.get_track_channels = get_track_channels_generic, |