From owner-freebsd-stable Sat Dec 5 09:07:35 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA22462 for freebsd-stable-outgoing; Sat, 5 Dec 1998 09:07:35 -0800 (PST) (envelope-from owner-freebsd-stable@FreeBSD.ORG) Received: from arg1.demon.co.uk (arg1.demon.co.uk [194.222.34.166]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA22457 for ; Sat, 5 Dec 1998 09:07:32 -0800 (PST) (envelope-from arg@arg1.demon.co.uk) Received: from localhost (arg@localhost) by arg1.demon.co.uk (8.8.8/8.8.7) with SMTP id RAA05541 for ; Sat, 5 Dec 1998 17:07:29 GMT (envelope-from arg@arg1.demon.co.uk) Date: Sat, 5 Dec 1998 17:06:54 +0000 (GMT) From: Andrew Gordon X-Sender: arg@server.arg.sj.co.uk To: stable@FreeBSD.ORG Subject: Problem with CD9660 root on -stable Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1577300402-912877614=:5450" Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --0-1577300402-912877614=:5450 Content-Type: TEXT/PLAIN; charset=US-ASCII I've been playing with CD root filesystem ('-C' at the boot prompt). All seems to be OK on SCSI systems, within the limited scope of my testing. However, using an IDE/ATAPI CDROM fails to mount the root filesystem. Having traced this a bit, I find that iso_get_ssector() [in sys/isofs/cd9660/cd9660_vfsops.c] is returning bogus results; my immediate problem can be fixed by hacking it to return zero always (disabling support for multi-session CDROMs). Digging a little deeper, it appears that the wdc driver implements CDIOREADTOCENTRYS but not the related CDIOREADTOCENTRY that is needed by iso_get_ssector(). This should still be OK - iso_get_sector() traps the error and simply assumes a single-session CD in this case - but unfortunately the error test is wrong (because it is calling the driver's ioctl entry point directly, the return value is zero or an errno value). The enclosed patch fixes the problem. --0-1577300402-912877614=:5450 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="cd9660.patch" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: SW5kZXg6IGlzb2ZzL2NkOTY2MC9jZDk2NjBfdmZzb3BzLmMNCj09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT0NClJDUyBmaWxlOiAvY3VycmVudC9yZXBvc2l0b3J5 L3NyYy9zeXMvaXNvZnMvY2Q5NjYwL2NkOTY2MF92ZnNvcHMuYyx2DQpyZXRy aWV2aW5nIHJldmlzaW9uIDEuMTUuNC4yDQpkaWZmIC1jIC1yMS4xNS40LjIg Y2Q5NjYwX3Zmc29wcy5jDQoqKiogY2Q5NjYwX3Zmc29wcy5jCTE5OTgvMDEv MDIgMTY6NDY6MTUJMS4xNS40LjINCi0tLSBjZDk2NjBfdmZzb3BzLmMJMTk5 OC8xMi8wNSAxNzowNDowNg0KKioqKioqKioqKioqKioqDQoqKiogMTI1LDEz NyAqKioqDQogIAlpZiAoaW9jdGxwID09IE5VTEwpDQogIAkJcmV0dXJuIDA7 DQogIA0KISAJaWYgKGlvY3RscChkZXYsIENESU9SRUFEVE9DSEVBREVSLCAo Y2FkZHJfdCkmaCwgRlJFQUQsIHApID09IC0xKQ0KICAJCXJldHVybiAwOw0K ICANCiAgCWZvciAoaSA9IGguZW5kaW5nX3RyYWNrOyBpID49IDA7IGktLSkg ew0KICAJCXQuYWRkcmVzc19mb3JtYXQgPSBDRF9MQkFfRk9STUFUOw0KICAJ CXQudHJhY2sgPSBpOw0KISAJCWlmIChpb2N0bHAoZGV2LCBDRElPUkVBRFRP Q0VOVFJZLCAoY2FkZHJfdCkmdCwgRlJFQUQsIHApID09IC0xKQ0KICAJCQly ZXR1cm4gMDsNCiAgCQlpZiAoKHQuZW50cnkuY29udHJvbCAmIDQpICE9IDAp DQogIAkJCS8qIGZvdW5kIGEgZGF0YSB0cmFjayAqLw0KLS0tIDEyNSwxMzcg LS0tLQ0KICAJaWYgKGlvY3RscCA9PSBOVUxMKQ0KICAJCXJldHVybiAwOw0K ICANCiEgCWlmIChpb2N0bHAoZGV2LCBDRElPUkVBRFRPQ0hFQURFUiwgKGNh ZGRyX3QpJmgsIEZSRUFELCBwKSAhPSAwKQ0KICAJCXJldHVybiAwOw0KICAN CiAgCWZvciAoaSA9IGguZW5kaW5nX3RyYWNrOyBpID49IDA7IGktLSkgew0K ICAJCXQuYWRkcmVzc19mb3JtYXQgPSBDRF9MQkFfRk9STUFUOw0KICAJCXQu dHJhY2sgPSBpOw0KISAJCWlmIChpb2N0bHAoZGV2LCBDRElPUkVBRFRPQ0VO VFJZLCAoY2FkZHJfdCkmdCwgRlJFQUQsIHApICE9IDApDQogIAkJCXJldHVy biAwOw0KICAJCWlmICgodC5lbnRyeS5jb250cm9sICYgNCkgIT0gMCkNCiAg CQkJLyogZm91bmQgYSBkYXRhIHRyYWNrICovDQo= --0-1577300402-912877614=:5450-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message