[hfs-user] To make a Readonly HFS Volume

Biswaroop(External) Biswaroop\(External\)" <biswaroopb@integramicro.com
Fri, 26 Apr 2002 19:26:19 +0530


Hi Nandini,
 Well if I make mdb.drAttrib = 0;
  Then I will be nullifying the other volume conditions.
  Therefore I am Oring it and I believe the code
  which will check for the Readonly flag will have
  this logic ..
  if(mdb.drAttrib & HFS_READONLY)
{
   //Means Volume is Readonly
}
where
# define HFS_READONLY   (1<<15)

What do  u say??

regs
 Biswaroop


----- Original Message -----
From: "Entwicklung" <entwicklung@whengenibk.de>
To: "Biswaroop(External)" <biswaroopb@integramicro.com>
Cc: <hfs-user@lists.mars.org>
Sent: Friday, April 26, 2002 6:16 PM
Subject: Re: [hfs-user] To make a Readonly HFS Volume


> Are you sure you've set drAtrb to 0 first before OR-ing 0x8000 with it ?
>
> Or are you just setting mdb.drAtrb  = 0x8000 instead of  :
>
> 1) mdb.drAtrb = 0x0000;
> 2) mdb.drAtrb | = 0x8000 ;
>
> Stt 2) without stt 1) might result in some unknown value getting written.
>
> -Nandini
>
>
> ----- Original Message -----
> From: "Biswaroop(External)" <biswaroopb@integramicro.com>
> To: "Entwicklung" <entwicklung@whengenibk.de>
> Sent: Friday, April 26, 2002 2:05 PM
> Subject: Re: [hfs-user] To make a Readonly HFS Volume
>
>
> > Hi Nandini,
> >  Thanks for a Quick Reply.
> >  But I did that too..but no success.
> >  regrds
> > Biswaroop
> > ----- Original Message -----
> > From: "Entwicklung" <entwicklung@whengenibk.de>
> > To: "Biswaroop(External)" <biswaroopb@integramicro.com>
> > Cc: <hfs-user@lists.mars.org>
> > Sent: Friday, April 26, 2002 5:08 PM
> > Subject: Re: [hfs-user] To make a Readonly HFS Volume
> >
> >
> > > Wouldn't setting bit 15 give 0x8000 ??? numbering the 16 bits from
0..15
> > > i.e.
> > >
> > > - Nandini
> > >
> > > ----- Original Message -----
> > > From: "Biswaroop(External)" <biswaroopb@integramicro.com>
> > > To: <hfs-user@lists.mars.org>
> > > Sent: Friday, April 26, 2002 1:17 PM
> > > Subject: [hfs-user] To make a Readonly HFS Volume
> > >
> > >
> > > > Hi ,
> > > >
> > > > I want to make a HFS volume readonly.
> > > > I am setting the flag in mdb.drAtrb to
> > > >
> > > > mdb.drAtrb | = 0x4000 ( As said in Inside Macintosh)
> > > >
> > > > Bit    Meaning
> > > > 15      Set  if th volume is Locked by Software.
> > > >
> > > > After creating a Image of such a Volume.
> > > >  I am mounting it with a FreeWare application in Windows which can
> mount
> > > HFS
> > > > volumes.
> > > >  But , I can still add files to that volume through this
> > > >   software and delete them too.
> > > >   That shows the volume is not Locked.
> > > >   So, anything else I should do to Volume parameters
> > > >   to make that Volume represent a ReadOnly one??
> > > >
> > > >   Waiting for ur Inputs.
> > > >
> > > >    Regards
> > > >    Biswaroop
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > The difference between sunrise and
> > > > sunset lies in the freshness of your
> > > > eyes.
> > > >                                   --Bisban