// qSupported interprets qSupported responses.
975641
func (conn *gdbConn) qSupported(multiprocess bool) (features map[string]bool, err error) {
	q := qSupportedSimple
	if multiprocess {
		q = qSupportedMultiprocess
	}
	respBuf, err := conn.exec([]byte(q), "init/qSupported")
	if err != nil {
		return nil, err
	}
	resp := strings.Split(string(respBuf), ";")
	features = make(map[string]bool)
	for _, stubfeature := range resp {
		if len(stubfeature) <= 0 {
			continue
		} else if equal := strings.Index(stubfeature, "="); equal >= 0 {
			if stubfeature[:equal] == "PacketSize" {
				if n, err := strconv.ParseInt(stubfeature[equal+1:], 16, 64); err == nil {
					conn.packetSize = int(n)
				}
			}
		} else if stubfeature[len(stubfeature)-1] == '+' {
			features[stubfeature[:len(stubfeature)-1]] = true
		}
	}
	return features, nil
}
759856
func (plugin *flexVolumePlugin) isUnsupported(command string) bool {
	plugin.Lock()
	defer plugin.Unlock()
	for _, unsupportedCommand := range plugin.unsupportedCommands {
		if command == unsupportedCommand {
			return true
		}
	}
	return false
}
166591
func (s *SubReq) validate() error {
	// Check the length of the Topic Filter.
	l := len(s.TopicFilter)

	if l == 0 {
		return ErrNoTopicFilter
	}

	if l > maxStringsLen {
		return ErrTopicFilterExceedsMaxStringsLen
	}

	// Check the QoS.
	if !mqtt.ValidQoS(s.QoS) {
		return ErrInvalidQoS
	}

	return nil
}
469614
func ConfigNotSupported(name string, cfgBytes []byte) ([]byte, error) {
	var mapSlice yaml.MapSlice
	if err := yaml.Unmarshal(cfgBytes, &mapSlice); err != nil {
		return nil, errors.Wrapf(err, "failed to unmarshal %s configuration as yaml.MapSlice", name)
	}
	if len(mapSlice) != 0 {
		return nil, errors.Errorf("%s does not currently support configuration", name)
	}
	return cfgBytes, nil
}
963850
func SupportedTypes() []string {
	// This is kind of a hack but keeps the definition of types here in
	// ctypes.go. If you create a new ConfigValue type be sure and add here
	// to return the Type() response. This will cause any depedant components
	// to acknowledge and use that type.
	t := []string{
		// String
		ConfigValueStr{}.Type(),
		// Integer
		ConfigValueInt{}.Type(),
		// Float
		ConfigValueFloat{}.Type(),
		// Bool
		ConfigValueBool{}.Type(),
	}
	return t
}
998710
func UnsupportedMediaType(w http.ResponseWriter, response interface{}) {
	Respond(w, http.StatusUnsupportedMediaType, response)
}
567696
func (c *client) makeQFilter(qsubs [][]*subscription) {
	qs := make([][]byte, 0, len(qsubs))
	for _, qsub := range qsubs {
		if len(qsub) > 0 {
			qs = append(qs, qsub[0].queue)
		}
	}
	c.pa.queues = qs
}
1188299
func qParamSplit(v string) (mediaType string, qValue string, acceptParams string) {
	rest := v
	for {
		semicolon := strings.IndexRune(rest, ';')
		if semicolon < 0 {
			mediaType = v
			return
		}
		semicolonAbs := len(v) - len(rest) + semicolon // mark
		rest = rest[semicolon:]

		rest = rest[1:] // consume ;
		rest = strings.TrimLeftFunc(rest, unicode.IsSpace)
		if rest == "" || (rest[0] != 'q' && rest[0] != 'Q') {
			continue
		}

		rest = rest[1:] // consume q
		rest = strings.TrimLeftFunc(rest, unicode.IsSpace)
		if rest == "" || rest[0] != '=' {
			continue
		}

		rest = rest[1:] // consume =
		rest = strings.TrimLeftFunc(rest, unicode.IsSpace)
		if rest == "" {
			continue
		}

		qValueStartAbs := len(v) - len(rest) // mark
		semicolon2 := strings.IndexRune(rest, ';')
		if semicolon2 >= 0 {
			semicolon2Abs := len(v) - len(rest) + semicolon2
			mediaType = v[:semicolonAbs]
			qValue = v[qValueStartAbs:semicolon2Abs]
			acceptParams = v[semicolon2Abs+1:]
			acceptParams = strings.TrimLeftFunc(acceptParams, unicode.IsSpace)
		} else {
			mediaType = v[:semicolonAbs]
			qValue = v[qValueStartAbs:]
		}
		qValue = strings.TrimRightFunc(qValue, unicode.IsSpace)
		return
	}
}
109658
func (sc *conn) QueueSubscribe(subject, qgroup string, cb MsgHandler, options ...SubscriptionOption) (Subscription, error) {
	return sc.subscribe(subject, qgroup, cb, options...)
}
905777
func accepts(a, ctype string) (q float64) {
	if a == ctype || a == "*/*" || a == "" {
		// bail out in some common cases
		return 1
	}
	cGroup, cType := split(ctype, "/")
	for _, field := range strings.Split(a, ",") {
		found, match := false, false
		for i, token := range strings.Split(field, ";") {
			if i == 0 {
				// token is "type/subtype", "type/*" or "*/*"
				aGroup, aType := split(token, "/")
				if cType == aType || aType == "*" {
					if (aGroup == "*" && aType == "*") || cGroup == aGroup {
						// token matches, continue to look for a q value
						found = true
						continue
					}
				}
				break
			}
			// token is "key=value"
			k, v := split(token, "=")
			if k != "q" {
				continue
			}
			// k is "q"
			f, err := strconv.ParseFloat(v, 64)
			if err != nil {
				break
			}
			if q < f {
				q = f
			}
			match = true
			break
		}
		if found && !match {
			q = 1
			break
		}
	}
	return
}
605331
func IsUnsupportedType(err error) bool {
	_, ok := Cause(err).(UnsupportedTypeError)
	return ok
}
35274
func (c *Client) IsRequestTypeSupported(reqType, subType int64) bool {
	switch reqType {
	case kv.ReqTypeSelect, kv.ReqTypeIndex:
		switch subType {
		case kv.ReqSubTypeGroupBy, kv.ReqSubTypeBasic, kv.ReqSubTypeTopN:
			return true
		default:
			return c.supportExpr(tipb.ExprType(subType))
		}
	case kv.ReqTypeDAG:
		return c.supportExpr(tipb.ExprType(subType))
	case kv.ReqTypeAnalyze:
		return true
	}
	return false
}
978285
func GetUnsupportedProperties(configDicts ...map[string]interface{}) []string {
	unsupported := map[string]bool{}

	for _, configDict := range configDicts {
		for _, service := range getServices(configDict) {
			serviceDict := service.(map[string]interface{})
			for _, property := range types.UnsupportedProperties {
				if _, isSet := serviceDict[property]; isSet {
					unsupported[property] = true
				}
			}
		}
	}

	return sortedKeys(unsupported)
}
433245
func (s *RecordingGroup) SetAllSupported(v bool) *RecordingGroup {
	s.AllSupported = &v
	return s
}
47624
func IsTypeSupportedSave(t ImageType) bool {
	_, ok := ImageTypes[t]
	return ok && IsImageTypeSupportedByVips(t).Save
}
123152
func supportsCOption(mj, mn, mc int) bool {
	return mj > 1 || (mj == 1 && (mn > 4 || (mn == 4 && mc >= 11)))
}
84258
func xfsSupported() bool {
	// Make sure mkfs.xfs is available
	if _, err := exec.LookPath("mkfs.xfs"); err != nil {
		return false
	}

	// Check if kernel supports xfs filesystem or not.
	exec.Command("modprobe", "xfs").Run()

	f, err := os.Open("/proc/filesystems")
	if err != nil {
		logrus.Warnf("devmapper: Could not check if xfs is supported: %v", err)
		return false
	}
	defer f.Close()

	s := bufio.NewScanner(f)
	for s.Scan() {
		if strings.HasSuffix(s.Text(), "\txfs") {
			return true
		}
	}

	if err := s.Err(); err != nil {
		logrus.Warnf("devmapper: Could not check if xfs is supported: %v", err)
	}
	return false
}