From owner-freebsd-arch@FreeBSD.ORG Fri Apr 1 15:20:27 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 596861065691 for ; Fri, 1 Apr 2011 15:20:27 +0000 (UTC) (envelope-from aduane@juniper.net) Received: from exprod7og115.obsmtp.com (exprod7og115.obsmtp.com [64.18.2.217]) by mx1.freebsd.org (Postfix) with ESMTP id B1BD28FC15 for ; Fri, 1 Apr 2011 15:20:25 +0000 (UTC) Received: from source ([66.129.224.36]) (using TLSv1) by exprod7ob115.postini.com ([64.18.6.12]) with SMTP ID DSNKTZXtOM9t4CtvXu6aQWHJR50nUBYTR95R@postini.com; Fri, 01 Apr 2011 08:20:27 PDT Received: from p-emfe02-wf.jnpr.net (172.28.145.25) by P-EMHUB02-HQ.jnpr.net (172.24.192.36) with Microsoft SMTP Server (TLS) id 8.2.254.0; Fri, 1 Apr 2011 08:04:06 -0700 Received: from EMBX01-WF.jnpr.net ([fe80::1914:3299:33d9:e43b]) by p-emfe02-wf.jnpr.net ([fe80::c126:c633:d2dc:8090%11]) with mapi; Fri, 1 Apr 2011 11:05:40 -0400 From: Andrew Duane To: Warner Losh , Andriy Gapon Date: Fri, 1 Apr 2011 11:04:38 -0400 Thread-Topic: looking for error codes Thread-Index: AcvwfWvgdu2RiXRbQqKNabRJHzfR4wAALLZh Message-ID: References: <4D95E162.40605@FreeBSD.org>, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: FreeBSD Hackers , FreeBSD Arch Subject: RE: looking for error codes X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2011 15:20:27 -0000 AFAIK, FreeBSD does not really detect read-only media. This was something I= had to add as a small project here at work, and was considering cleaning u= p to try to get into CURRENT. If there's a real need for it, I could speed = that up. -- Andrew Duane Juniper Networks 978-589-0551 10 Technology Park Dr aduane@juniper.net Westford, MA 01886-3418 ________________________________________ From: owner-freebsd-hackers@freebsd.org [owner-freebsd-hackers@freebsd.org]= On Behalf Of Warner Losh [imp@bsdimp.com] Sent: Friday, April 01, 2011 10:51 AM To: Andriy Gapon Cc: FreeBSD Hackers; FreeBSD Arch Subject: Re: looking for error codes On Apr 1, 2011, at 8:29 AM, Andriy Gapon wrote: > > I am looking for error codes that would unambiguously signal that a disk = drive has > readonly or write-protected media and that disk drive has no media at the= moment. > I foresee these error codes being used mostly between disk peripheral dri= vers and > filesystem drivers. > > I will appreciate your suggestions. > > P.S. > I see that Linux uses EROFS and ENOMEDIUM for these purposes. > I am not sure about EROFS in this role. > And we don't have ENOMEDIUM (nor EMEDIUMTYPE). Maybe we could add ENOMEDIA for that (spelled however Linux spells it) afte= r EDAVE. Warner _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"