🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #5175

Re: reformat of hard drives

#5175
From: Jean-Michel Forgeas
Date: Tue, 04 Sep 1990 12:43
36 lines
1661 bytes
>In article <13618@sun.udel.edu> jtmorgan@sun.udel.edu (James Morgan) writes:
>>Is there any thing that can be done to put some sort of
>>prompt in the way of a person that is trying to reformat
>>the hard drive of an amiga?

If you Execute() the Format command with stdin redirected to NIL:, it
does not ask "insert disk to be initia........" before start. So you
could make a program which Execute() Format after your verifications:

main( argc, argv )
{
    .... find volume name with argv
    .... and rebuild the entire arg string

    if (volume == harddrive || what_you_want)
        {
        printf( "Do you really want... ?\n" );
        scanf( ....., answer );
        if (answer == no) return;
        }
    else{
        if (nil = Open( "NIL:",...))
            {
            sprintf( tmpbuf, "SYS:System/Format %ls\n", entire_arg_string );
            Execute( tmpbuf, nil, stdout );
            Close( nil );
            }
        }
}

--
                                     \___/
Jean-Michel Forgeas                   \-/
cbmvax!cbmehq!cbmfra!swinjm!forgeas    |    The Software Winery
                                      -^-
                           And, where is the universe ?
Technical Details
Message-ID: <forgeas.1669@swinjm.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ns-mx!iowasp.physics.uiowa.edu!ceres.physics.uiowa.edu!zaphod.mps.ohio-state.edu!mips!prls!pyramid!cbmvax!cbmehq!cbmfra!swinjm!forgeas
References: <13618@sun.udel.edu> <28569@nigel.ee.udel.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ns-mx!iowasp.physics.uiowa.edu!ceres.physics.uiowa.edu!zaphod.mps.ohio-state.edu!mips!prls!pyramid!cbmvax!cbmehq!cbmfra!swinjm!forgeas
From: forgeas@swinjm.UUCP (Jean-Michel Forgeas)
Newsgroups: comp.sys.amiga.tech
Subject: Re:  reformat of hard drives
Message-ID: <forgeas.1669@swinjm.UUCP>
Date: 4 Sep 90 12:43:31 GMT
References: <13618@sun.udel.edu> <28569@nigel.ee.udel.edu>
Lines: 36