772
841
if not (is_block or os.path.isfile(path)):
773
842
raise ValueError("%s: not an existing file or block device", path)
775
845
if partitions and is_block:
776
846
ptdata = sysfs_partition_data(path)
777
847
for kname, ptnum, start, size in ptdata:
781
856
LOG.debug("wiping 1M on %s at offsets %s", path, offsets)
782
857
return zero_file_at_offsets(path, offsets, buflen=buflen, count=count)