code: def get_mode(device):
      '''
      Report whether the quota system for this device is on or off
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' quota.get_mode
      '''
      ret = {}
      cmd = 'quotaon -p {0}'.format(device)
      out = __salt__['cmd.run'](cmd, python_shell=False)
      for line in out.splitlines():
          comps = line.strip().split()
          if comps[3] not in ret:
              if comps[0].startswith('quotaon'):
                  if comps[1].startswith('Mountpoint'):
                      ret[comps[4]] = 'disabled'
                      continue
                  elif comps[1].startswith('Cannot'):
                      ret[device] = 'Not found'
                      return ret
                  continue
              ret[comps[3]] = {
                  'device': comps[4].replace('(', '').replace(')', ''),
              }
          ret[comps[3]][comps[0]] = comps[6]
      return ref get_mode(device):
      '''
      Report whether the quota system for this device is on or off
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' quota.get_mode
      '''
      ret = {}
      cmd = 'quotaon -p {0}'.format(device)
      out = __salt__['cmd.run'](cmd, python_shell=False)
      for line in out.splitlines():
          comps = line.strip().split()
          if comps[3] not in ret:
              if comps[0].startswith('quotaon'):
                  if comps[1].startswith('Mountpoint'):
                      ret[comps[4]] = 'disabled'
                      continue
                  elif comps[1].startswith('Cannot'):
                      ret[device] = 'Not found'
                      return ret
                  continue
              ret[comps[3]] = {
                  'device': comps[4].replace('(', '').replace(')', ''),
              }
          ret[comps[3]][comps[0]] = comps[6]
      return ret
docs: Report whether the quota system for this device is on or off
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' quota.get_mode