How to enable block writing on root volume's disk
How to enable block writing on root volume's disk
- Subject: How to enable block writing on root volume's disk
- From: Thomas Tempelmann <email@hidden>
- Date: Thu, 2 Jul 2009 23:36:22 +0200
I'm writing a disk repair tool (iBored) and wonder if I can get OS X
to let my tool write to "safe" blocks on the root vol's disk (usually
/dev/disk0, but not always).
I like to modify blocks _outside_ the mounted root file system, e.g.
the partition table or other blocks not appearing as sub-partitions
(such as "disk0sN"). Therefore, I need to open the "disk0" device.
Now, even if my app is running as root, it can't get a read/write
permission, it seems. I am using code like this:
fd = open ("/dev/disk0", O_RDWR);
This results in an error ('fd' is -1)
Any ideas how to circumvent this?
I mean, I do not mind not being allowed to write to any mounted
partitions, but I should be able to write outside of them, shouldn't
I?
--
Thomas Tempelmann, http://www.tempel.org/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden