[DRIVERS] Add linux-like snprintf() for linux compatiblity

Signed-off-by: Anup Patel <anup@brainfault.org>