small patch to read PTF cds

Marty Leisner (leisner@sdsp.mc.xerox.com)
Mon, 18 Mar 1996 10:20:55 PST


This is a small patch to allow Rich Morin's Prime Time Freeware
disks to be read...

(Someone convinced him to use the multi-volume feature, defaut
linux refused to honor it; I haven't come across problems with this
patch).

BTW -- freebsd didn't have a problem (haven't looked at their code).

--- fs/isofs/inode.c 1996/03/17 21:35:14 1.1
+++ fs/isofs/inode.c 1996/03/17 21:42:25
@@ -25,6 +25,7 @@
#include <asm/system.h>
#include <asm/segment.h>

+#define MULTI_VOLUME
#ifdef LEAK_CHECK
static int check_malloc = 0;
static int check_bread = 0;
@@ -303,8 +304,10 @@
if(high_sierra){
rootp = (struct iso_directory_record *) h_pri->root_directory_record;
if (isonum_723 (h_pri->volume_set_size) != 1) {
+#ifndef MULTI_VOLUME
printk("Multi-volume disks not (yet) supported.\n");
goto out;
+#endif
};
s->u.isofs_sb.s_nzones = isonum_733 (h_pri->volume_space_size);
s->u.isofs_sb.s_log_zone_size = isonum_723 (h_pri->logical_block_size);
@@ -312,8 +315,10 @@
} else {
rootp = (struct iso_directory_record *) pri->root_directory_record;
if (isonum_723 (pri->volume_set_size) != 1) {
+#ifndef MULTI_VOLUME
printk("Multi-volume disks not (yet) supported.\n");
goto out;
+#endif
};
s->u.isofs_sb.s_nzones = isonum_733 (pri->volume_space_size);
s->u.isofs_sb.s_log_zone_size = isonum_723 (pri->logical_block_size);
@@ -585,10 +590,13 @@
inode->i_sb->u.isofs_sb.s_cruft = 'y';
}

+#ifndef MULTI_VOLUME
if (inode->i_sb->u.isofs_sb.s_cruft != 'y' &&
(volume_seq_no != 0) && (volume_seq_no != 1)) {
printk("Multi volume CD somehow got mounted.\n");
- } else {
+ } else
+#endif
+ {
if (S_ISREG(inode->i_mode))
inode->i_op = &isofs_file_inode_operations;
else if (S_ISDIR(inode->i_mode))

marty leisner@sdsp.mc.xerox.com
Member of the League for Programming Freedom (http://www.lpf.org)
Any sufficiently advanced technology is indistinguishable from magic
Arthur C. Clarke, The Lost Worlds of 2001