Lines Matching refs:dev
128 dev = LoopbackDevice()
129 dev.setup(fileName)
131 command = [findProg('sfdisk'), '-d', dev.devFile]
147 dev.destroy()
222 dev = LoopbackDevice()
223 if dev.setup(path, offset=True) != 0:
226 if runPriv([findProg('mount'), str(dev), mountPoint]) != 0:
227 dev.destroy()
242 dev = mountPointToDev(mountPoint)
243 if not dev:
251 dev.destroy()
284 def partition(dev, cylinders, heads, sectors):
291 str(dev)], inputVal=comStr)
296 dev = LoopbackDevice()
297 if dev.setup(path) != 0:
302 if partition(dev, *chsFromSize(size / BlockSize)) != 0:
303 dev.destroy()
306 dev.destroy()
317 def formatImage(dev, fsType):
318 return runPriv([findProg('mkfs.%s' % fsType, dev), str(dev)])
323 dev = LoopbackDevice()
324 if dev.setup(path, offset=True) != 0:
328 if formatImage(dev, options.fstype) != 0:
329 dev.destroy()
332 dev.destroy()
340 dev = LoopbackDevice()
341 if dev.setup(path) != 0:
344 if partition(dev, *chsFromSize((mb * MB) / BlockSize)) != 0:
345 dev.destroy()
347 dev.destroy()
348 if dev.setup(path, offset=True) != 0:
350 if formatImage(dev, options.fstype) != 0:
351 dev.destroy()
353 dev.destroy()