Added the possibility of setting flags

Hi retr0h, I needed to create partitions for md raid and I added the ability of setting flags.
Let me know what you think.