2011/1/14 Forest Bond <forest@xxxxxxxxxxxxxxxxxxx>: > On Fri, Jan 14, 2011 at 02:31:55PM +0100, PrzemysÅaw 'Przemoc' PaweÅczyk wrote: >> I have following suggestion for sfdisk: >> - adding offset/shift support for cumbersome raw disk images (like >> fixed-size VDI), that don't start at the beginning of the file. >> >> Required changes? >> IMO straightforward way is just adding another option (below is an >> example), global variable (e.g. shift) and fixing sseek() code and >> R.total_size in get_geometry() to take it into account. >> >> Â Â -t# [or --offset #] Âignore the number of bytes at the beginning > > Isn't this something you can just use a loopback device for? > > Âlosetup -f -o $offset $image To some degree -- yes. It requires BLK_DEV_LOOP (Loopback device support) built-in in the kernel or compiled as a module though. This is IMHO unneeded kernel dependency that can be avoided. Regards. P.S. mount() and umount() should have their own capability, because requiring CAP_SYS_ADMIN is pretty insane. But it's not the scope of this ML. -- PrzemysÅaw 'Przemoc' PaweÅczyk http://przemoc.net/ -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html