docs: def diskusage(*args):
      '''
      Return the disk usage for this minion
  
      Usage::
  
          salt '*' status.diskusage [paths and/or filesystem types]
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' status.diskusage         # usage for all filesystems
          salt '*' status.diskusage / /tmp  # usage for / and /tmp
          salt '*' status.diskusage ext?    # usage for ext[234] filesystems
          salt '*' status.diskusage / ext?  # usage for / and all ext filesystems
      '''
      selected = set()
      fstypes = set()
      if not args:
          # select all filesystems
          fstypes.add('*')
      else:
          for arg in args:
              if arg.startswith('/'):
                  # select path
                  selected.add(arg)
              else:
                  # select fstype
                  fstypes.add(arg)
  
      if fstypes:
          # determine which mount points host the specified fstypes
          regex = re.compile(
              '|'.join(
                  fnmatch.translate(fstype).format('(%s)') for fstype in fstypes
              )
          )
          # ifile source of data varies with OS, otherwise all the same
          if __grains__['kernel'] == 'Linux':
              try:
                  with salt.utils.files.fopen('/proc/mounts', 'r') as fp_:
                      ifile = salt.utils.stringutils.to_unicode(fp_.read()).splitlines()
              except OSError:
                  return {}
          elif __grains__['kernel'] in ('FreeBSD', 'SunOS'):
              ifile = __salt__['cmd.run']('mount -p').splitlines()
          else:
              raise CommandExecutionError('status.diskusage not yet supported on this platform')
  
          for line in ifile:
              comps = line.split()
              if __grains__['kernel'] == 'SunOS':
                  if len(comps) >= 4:
                      mntpt = comps[2]
                      fstype = comps[3]
                      if regex.match(fstype):
                          selected.add(mntpt)
              else:
                  if len(comps) >= 3:
                      mntpt = comps[1]
                      fstype = comps[2]
                      if regex.match(fstype):
                          selected.add(mntpt)
  
      # query the filesystems disk usage
      ret = {}
      for path in selected:
          fsstats = os.statvfs(path)
          blksz = fsstats.f_bsize
          available = fsstats.f_bavail * blksz
          total = fsstats.f_blocks * blksz
          ret[path] = {"available": available, "total": total}
      return ret