def _blkid_output(out):
    flt = lambda data: [el for el in data if el.strip()]
    data = {}
    for dev_meta in flt(out.split("\n\n")):
        dev = {}
        for items in flt(dev_meta.strip().split("\n")):
            key, val = items.split("=", 1)
            dev[key.lower()] = val
        if dev.pop("type") == "xfs":
            dev['label'] = dev.get('label')
            data[dev.pop("devname")] = dev

    mounts = _get_mounts()
    for device in six.iterkeys(mounts):
        if data.get(device):
            data[device].update(mounts[device])

    return data
Parse blkid output.
dataset/ETHPy150Open saltstack/salt/salt/modules/xfs.py/_blkid_output