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
mount
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
0..15
Well if I make mdb.drAttrib = 0; Then I will be nullifying the other volume conditions.
Not necessarily.... just check if mdb.drAttrib has been set to 0 right before you OR it with your other conditions - not initializing your variables correctly is obviously not a good choice... what kind of logic you use is left to you..
- Nandini
written.