From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,14aa27db81ce3b40 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!21g2000vbk.googlegroups.com!not-for-mail From: Martin Newsgroups: comp.lang.ada Subject: Re: How to exit an Ada program with (unix shell) error code? Date: Thu, 7 May 2009 05:08:49 -0700 (PDT) Organization: http://groups.google.com Message-ID: <3d6b432a-0f6b-4a0f-9a23-eff90ea319ac@21g2000vbk.googlegroups.com> References: <49ba30c9-a1e6-4346-8618-d256f87ac301@s31g2000vbp.googlegroups.com> <356247f9-4a83-44aa-a412-4500e6af19cf@f1g2000prb.googlegroups.com> <2yxMl.30237$941.3661@bgtnsc04-news.ops.worldnet.att.net> <4a02b178$0$31872$9b4e6d93@newsspool3.arcor-online.net> NNTP-Posting-Host: 20.133.0.8 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1241698129 13370 127.0.0.1 (7 May 2009 12:08:49 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 7 May 2009 12:08:49 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 21g2000vbk.googlegroups.com; posting-host=20.133.0.8; posting-account=g4n69woAAACHKbpceNrvOhHWViIbdQ9G User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:5727 Date: 2009-05-07T05:08:49-07:00 List-Id: On May 7, 12:22=A0pm, a...@anon.org (anon) wrote: > "Initialize_spca_Driver" is the main subprogram for this device module in > either Ada or C versions > > with Linux ; > with Linux.Modules ; > with Linux.Modules.IO ; > > use =A0Linux ; > use =A0Modules ; > use =A0IO ; > > package body spca is > > .. > > -- ----------------------------------------------------------------------= -- -- > -- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Initialize_spca_Driver= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 -- > -- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0-- > -- Initialize_spca_Driver -- Initializes the loadable module. =A0 =A0 =A0= =A0 =A0 =A0 =A0 -- > -- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1. =A0Create and e= xtry in the "/proc" =A0 =A0 =A0 =A0 =A0 =A0-- > -- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 2. =A0Registers th= e usb device =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 -- > -- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0-- > -- ----------------------------------------------------------------------= -- -- > > =A0 function Initialize_spca_Driver return Exit_Status is > =A0 =A0 begin > =A0 =A0 =A0 Create_Proc_File_System ; > > =A0 =A0 =A0 if usb_register ( USB_Driver_Table ) then > =A0 =A0 =A0 =A0 info ( "SPCA USB ERROR: Camera driver not installed" ) ; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-- Error t= ell kernel it can reclaim this memory > =A0 =A0 =A0 =A0 return Failure ; > =A0 =A0 =A0 end if ; > =A0 =A0 -- It up and waiting > =A0 =A0 info ( DRIVER_DESC & " : version " & DRIVER_VERSION ) ; > =A0 =A0 return Success ; =A0 > =A0 end Initialize_spca_Driver ; > end spca ; Fine...it just isn't guarenteed to be portable. Cheers -- Martin