code: def _parse_xfs_info(data):
      '''
      Parse output from "xfs_info" or "xfs_growfs -n".
      '''
      ret = {}
      spr = re.compile(r'\s+')
      entry = None
      for line in [spr.sub(" ", l).strip().replace(", ", " ") for l in data.split("\n")]:
          if not line:
              continue
          nfo = _xfs_info_get_kv(line)
          if not line.startswith("="):
              entry = nfo.pop(0)
              ret[entry[0]] = {'section': entry[(entry[1] != '***' and 1 or 0)]}
          ret[entry[0]].update(dict(nfo))
  
      return ref _parse_xfs_info(data):
      '''
      Parse output from "xfs_info" or "xfs_growfs -n".
      '''
      ret = {}
      spr = re.compile(r'\s+')
      entry = None
      for line in [spr.sub(" ", l).strip().replace(", ", " ") for l in data.split("\n")]:
          if not line:
              continue
          nfo = _xfs_info_get_kv(line)
          if not line.startswith("="):
              entry = nfo.pop(0)
              ret[entry[0]] = {'section': entry[(entry[1] != '***' and 1 or 0)]}
          ret[entry[0]].update(dict(nfo))
  
      return ret
docs: Parse output from "xfs_info" or "xfs_growfs -n".