This patch extends functionality of e{2|4}fsprogs to add EXT2_FLAG_DIRECT flag to be passed to ext2fs_open2() function. This internally calls open() function with O_DIRECT and handles the memory alignment for both read and write operations. In some cases direct access to devices is necessary and that was the main reason for this patch to be done. The main reason why this was done is that pygrub (used by xen virtualization user-space package, it's a python version of grub for paravirtualized guests) sometimes uses outdated version of grub.conf file. Modifications to xen package were *not* enough because e2fsprogs doesn't open the files directly. That's why I added EXT2_FLAG_DIRECT support to make read/write operations work directly when passed. It's been tested with pygrub like mentioned above for read operation and it's working fine. Signed-off-by: Michal Novotny