'Reset device paths to allow unmounting.'

def reset_dev(self):

    if (not self.device):
        return
    self.linked = self.mapped = self.mounted = True
    device = self.device
    if (os.path.isabs(device) and os.path.exists(device)):
        if device.startswith('/dev/mapper/'):
            device = os.path.basename(device)
            if ('p' in device):
                (device, self.partition) = device.rsplit('p', 1)
                self.device = os.path.join('/dev', device)
