- path = argv[optind];
-
- fd = btrfs_open_dir(path, &dirstream, 1);
- if (fd < 0)
- return 1;
-
- res = ioctl(fd, BTRFS_IOC_SYNC);
- e = errno;
- close_file_or_dir(fd, dirstream);
- if( res < 0 ){
- error("sync ioctl failed on '%s': %s", path, strerror(e));