On Mon, Apr 08, 2013 at 05:22:38PM +0200, David Sterba wrote:
> > +   fd = open("/dev/btrfs-control", O_RDWR);
> > +   e = errno;
> > +   if (fd < 0) {
> > +           FILE *mfd = popen("lsmod | grep btrfs", "r");
> Please transform this into C.

Actually, what if btrfs is not built as a module? There should be another
way to detect that btrfs is compiled in, like opening the control device
and reading something back.

david
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to