def zero(h, count, offset, may_trim): global disk if may_trim: disk[offset:offset+count] = bytearray(count) else: nbdkit.set_error(errno.EOPNOTSUPP) raise Exception
def zero(h, count, offset, flags): global disk if flags & nbdkit.FLAG_MAY_TRIM: disk[offset:offset+count] = bytearray(count) else: nbdkit.set_error(errno.EOPNOTSUPP) raise Exception