From: Robert M. <mr...@gm...> - 2012-06-24 18:31:52
|
I like the first idea, because it is careful. The second idea will make volumes get locked, and therefore permanently damaged" (unmountable) the very first time SheepShaver or BasiliskII crashes. On 6/24/12, Dave Vasilevsky <va...@us...> wrote: > On a couple of occasions, disk images of mine have become corrupted > due to accidental double-mounting in SheepShaver and/or BasiliskII. I > propose we try and minimize the chance of this happening. Two > situations need to be dealt with: > > 1. The host OS and SheepShaver (or B2) both have the disk mounted. We > already try to prevent this with is_drive_mounted(), but it only works > on Linux hosts, and only with real devices, not loop mounts. > [in OS X we can use] getmntinfo(3) [or] IOKit [(using] undocumented IOKit properties > [...] > 2. Multiple instances of B2/SS using the same disk image. We should be > able to prevent this by using advisory locks in Sys_open(). > > What do folks think? Worth working on? -- Robert Munafo -- mrob.com Follow me at: gplus.to/mrob - fb.com/mrob27 - twitter.com/mrob_27 - mrob27.wordpress.com - youtube.com/user/mrob143 - rilybot.blogspot.com |