Return the contents of the filesystems in an OrderedDict

    config
        File containing filesystem infomation

    leading_key
        True    return dictionary keyed by 'name' and value as dictionary with other keys, values (name excluded)
                OrderedDict({ '/dir' : OrderedDict({'dev': '/dev/hd8', .... }}))

        False   return dictionary  keyed by 'name' and value as dictionary with all keys, values (name included)
                OrderedDict({ '/dir' : OrderedDict({'name': '/dir', 'dev': '/dev/hd8', ... })})

def _filesystems(config='/etc/filesystems', leading_key=True):
    '''
    Return the contents of the filesystems in an OrderedDict

    config
        File containing filesystem infomation

    leading_key
        True    return dictionary keyed by 'name' and value as dictionary with other keys, values (name excluded)
                OrderedDict({ '/dir' : OrderedDict({'dev': '/dev/hd8', .... }}))

        False   return dictionary  keyed by 'name' and value as dictionary with all keys, values (name included)
                OrderedDict({ '/dir' : OrderedDict({'name': '/dir', 'dev': '/dev/hd8', ... })})
    '''
    ret = OrderedDict()
    lines = []
    parsing_block = False
    if not os.path.isfile(config) or 'AIX' not in __grains__['kernel']:
        return ret

    # read in block of filesystems, block starts with '/' till empty line
    with salt.utils.files.fopen(config) as ifile:
        for line in ifile:
            line = salt.utils.stringutils.to_unicode(line)

            # skip till first entry
            if not line.startswith('/') and not parsing_block:
                continue

            if line.startswith('/'):
                parsing_block = True
                lines.append(line)
            elif not line.split():
                parsing_block = False
                try:
                    entry = _FileSystemsEntry.dict_from_lines(
                        lines,
                        _FileSystemsEntry.compatibility_keys)
                    lines = []
                    if 'opts' in entry:
                        entry['opts'] = entry['opts'].split(',')
                    while entry['name'] in ret:
                        entry['name'] += '_'

                    if leading_key:
                        ret[entry.pop('name')] = entry
                    else:
                        ret[entry['name']] = entry

                except _FileSystemsEntry.ParseError:
                    pass
            else:
                lines.append(line)

    return ret