search for: btrfs_scan_file

Displaying 1 result from an estimated 1 matches for "btrfs_scan_file".

2009 Dec 21
0
[PATCH] btrfsctl: scan device and exit without using ioctl
...#include "transaction.h" #include "utils.h" #include "version.h" +#include "disk-io.h" +#include "volumes.h" #ifdef __CHECKER__ #define BLKGETSIZE64 0 @@ -88,6 +90,30 @@ static int open_file_or_dir(const char *fname) } return fd; } + +int btrfs_scan_file (const char *path) +{ + int ret = -1; + struct btrfs_fs_devices *fs_devices = NULL; + u64 dev_count = 0; + int fd = -1; + + fd = open (path, O_RDONLY); + if (fd < 0) { + fprintf (stderr, "failed to open %s: %s\n", +...