/* Common ftrace options */
        xbc_node_for_each_array_value(node, "options", anode, p) {
-               if (strscpy(buf, p, ARRAY_SIZE(buf)) == -E2BIG) {
+               if (strscpy(buf, p, ARRAY_SIZE(buf)) < 0) {
                        pr_err("String is too long: %s\n", p);
                        continue;
                }
        const char *p;
 
        xbc_node_for_each_array_value(node, "events", anode, p) {
-               if (strscpy(buf, p, ARRAY_SIZE(buf)) == -E2BIG) {
+               if (strscpy(buf, p, ARRAY_SIZE(buf)) < 0) {
                        pr_err("String is too long: %s\n", p);
                        continue;
                }
 
        p = xbc_node_find_value(enode, "filter", NULL);
        if (p && *p != '\0') {
-               if (strscpy(buf, p, ARRAY_SIZE(buf)) == -E2BIG)
+               if (strscpy(buf, p, ARRAY_SIZE(buf)) < 0)
                        pr_err("filter string is too long: %s\n", p);
                else if (apply_event_filter(file, buf) < 0)
                        pr_err("Failed to apply filter: %s\n", buf);
 
        if (IS_ENABLED(CONFIG_HIST_TRIGGERS)) {
                xbc_node_for_each_array_value(enode, "actions", anode, p) {
-                       if (strscpy(buf, p, ARRAY_SIZE(buf)) == -E2BIG)
+                       if (strscpy(buf, p, ARRAY_SIZE(buf)) < 0)
                                pr_err("action string is too long: %s\n", p);
                        else if (trigger_process_regex(file, buf) < 0)
                                pr_err("Failed to apply an action: %s\n", p);