summaryrefslogtreecommitdiffstats
path: root/sysutils/cdrtools
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>2001-02-02 16:07:34 +0000
committerjoerg <joerg@FreeBSD.org>2001-02-02 16:07:34 +0000
commit68d78c950ed207bd3aeb8f8dd7aee1c3335fde01 (patch)
tree1fbacf460cb02a3bbc64a3d89c8003733ceaa2de /sysutils/cdrtools
parent74c937491b388ffeba51676a374212754b68b37e (diff)
downloadFreeBSD-ports-68d78c950ed207bd3aeb8f8dd7aee1c3335fde01.zip
FreeBSD-ports-68d78c950ed207bd3aeb8f8dd7aee1c3335fde01.tar.gz
Bring back my old Plasmon RF4100 to the list of actually working devices.
Reviewed by: dirk
Diffstat (limited to 'sysutils/cdrtools')
-rw-r--r--sysutils/cdrtools/files/patch-ai87
1 files changed, 87 insertions, 0 deletions
diff --git a/sysutils/cdrtools/files/patch-ai b/sysutils/cdrtools/files/patch-ai
new file mode 100644
index 0000000..6106947
--- /dev/null
+++ b/sysutils/cdrtools/files/patch-ai
@@ -0,0 +1,87 @@
+--- cdrecord/drv_philips.c.orig Fri Feb 2 15:14:16 2001
++++ cdrecord/drv_philips.c Fri Feb 2 16:00:48 2001
+@@ -62,6 +62,7 @@
+ LOCAL int write_track_info_philips __PR((SCSI *scgp, int));
+ LOCAL int write_track_philips __PR((SCSI *scgp, long, int));
+ LOCAL int open_track_philips __PR((SCSI *scgp, cdr_t *dp, int track, track_t *track_info));
++LOCAL int open_track_plasmon __PR((SCSI *scgp, cdr_t *dp, int track, track_t *track_info));
+ LOCAL int open_track_oldphilips __PR((SCSI *scgp, cdr_t *dp, int track, track_t *track_info));
+ LOCAL int open_track_yamaha __PR((SCSI *scgp, cdr_t *dp, int track, track_t *track_info));
+ LOCAL int close_track_philips __PR((SCSI *scgp, int track, track_t *trackp));
+@@ -71,6 +72,7 @@
+ LOCAL int plasmon_attach __PR((SCSI *scgp, cdr_t *));
+ LOCAL int ricoh_attach __PR((SCSI *scgp, cdr_t *));
+ LOCAL int philips_getlilo __PR((SCSI *scgp, long *lilenp, long *lolenp));
++LOCAL int plasmon_buf __PR((SCSI *, long *, long *));
+
+
+ struct cdd_52x_mode_page_21 { /* write track information */
+@@ -284,7 +286,7 @@
+ philips_getdisktype,
+ philips_load,
+ philips_unload,
+- buf_dummy,
++ plasmon_buf,
+ recovery_needed,
+ recover_philips,
+ speed_select_philips,
+@@ -293,7 +295,7 @@
+ reserve_track_philips,
+ scsi_cdr_write_philips,
+ no_sendcue,
+- open_track_philips,
++ open_track_plasmon,
+ close_track_philips,
+ (int(*)__PR((SCSI *, cdr_t *, int, track_t *, int, int)))cmd_dummy,
+ cmd_dummy,
+@@ -922,6 +924,22 @@
+ }
+
+ LOCAL int
++open_track_plasmon(scgp, dp, track, track_info)
++ SCSI *scgp;
++ cdr_t *dp;
++ int track;
++ track_t *track_info;
++{
++ if (select_secsize(scgp, track_info->secsize) < 0)
++ return (-1);
++
++ if (write_track_info_philips(scgp, track_info->sectype) < 0)
++ return (-1);
++
++ return (0);
++}
++
++LOCAL int
+ open_track_oldphilips(scgp, dp, track, track_info)
+ SCSI *scgp;
+ cdr_t *dp;
+@@ -1211,4 +1229,27 @@
+ *lolenp = lo;
+
+ return (0);
++}
++
++LOCAL int
++plasmon_buf(scgp, sp, fp)
++ SCSI *scgp;
++ long *sp; /* Size pointer */
++ long *fp; /* Free space pointer */
++{
++ /*
++ * There's no way to obtain these values from the
++ * Plasmon RF41xx devices. This function stub is only
++ * present to prevent cdrecord.c from calling a pointless
++ * READ BUFFER SCSI cmd which is meant to be used for
++ * something totally else, and which would only jam the
++ * Plasmon due to the incorrect parameters used.
++ */
++
++ if (sp)
++ *sp = 2 * 1024 * 1024; /* assume 2 MB */
++ if (fp)
++ *fp = 2 * 1024 * 1024; /* assume 2 MB */
++
++ return 100;
+ }
OpenPOWER on IntegriCloud