On Mon, Mar 05, 2018 at 12:56:11PM -0600, Tony Asleson wrote: > + } else if (strncmp(id, "stratis-", 8) == 0) { > + /* Private Stratis devices will be those that start with "stratis-" > + * and that do not match the expected pattern for a thinly > + * provisioned device. > + */ > + if (!regcomp(&re, > + "^stratis-1-[0-9a-f]{32}-thin-fs-[0-9a-f]{32}$", > + REG_EXTENDED)) { > + if (REG_NOMATCH == regexec(&re, id, 0, NULL, 0)) > + rc = 1; > + > + regfree(&re); > + } regcomp() ... would be possible to identify the device by any other way? It would be nice to keep the code simple and stupid. BTW, why you do not use any special prefix for the private device? Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html