+#if ENABLE_FEATURE_DD_IBS_OBS
+static int parse_comma_flags(char *val, const char *words, const char *error_in)
+{
+ int flags = 0;
+ while (1) {
+ int n;
+ char *arg;
+ /* find ',', replace them with NUL so we can use val for
+ * index_in_strings() without copying.
+ * We rely on val being non-null, else strchr would fault.
+ */
+ arg = strchr(val, ',');
+ if (arg)
+ *arg = '\0';
+ n = index_in_strings(words, val);
+ if (n < 0)
+ bb_error_msg_and_die(bb_msg_invalid_arg_to, val, error_in);
+ flags |= (1 << n);
+ if (!arg) /* no ',' left, so this was the last specifier */
+ break;
+ *arg = ','; /* to preserve ps listing */
+ val = arg + 1; /* skip this keyword and ',' */
+ }
+ return flags;
+}
+#endif
+