There are few helper functions (e.g. qemu_malloc) in osdep.c which are not OS dependent at all. Even the first CVS commit comment for osdep.c says "most functions are generic in fact". They are duplicated in qemu-img because osdep.c isn't used there. This patch moves those functions to cutils.c and removes the duplicates from qemu-img. Signed-off-by: Kevin Wolf