struct btrfs_ioctl_vol_args arg;
int res;
- if (!is_block_device(argv[i])) {
+ if (is_block_device(argv[i]) != 1) {
fprintf(stderr,
"ERROR: %s is not a block device\n", argv[i]);
ret++;
for( i = devstart ; i < argc ; i++ ){
char *path;
- if (!is_block_device(argv[i])) {
+ if (is_block_device(argv[i]) != 1) {
fprintf(stderr,
"ERROR: %s is not a block device\n", argv[i]);
ret = 1;
goto out;
}
- if (!is_block_device(path)) {
+ if (is_block_device(path) != 1) {
fprintf(stderr,
"ERROR: %s is not a block device\n", path);
ret = 1;
while (dev_cnt-- > 0) {
file = av[optind++];
- if (is_block_device(file))
+ if (is_block_device(file) == 1)
if (test_dev_for_mkfs(file, force_overwrite))
exit(1);
}
exit(1);
}
- if (is_block_device(file))
+ if (is_block_device(file) == 1)
btrfs_register_one_device(file);
if (dev_cnt == 0)
(unsigned long long)device->devid);
}
- if (is_block_device(file))
+ if (is_block_device(file) == 1)
btrfs_register_one_device(file);
}
char mp[PATH_MAX];
int fdmnt;
- if (is_block_device(path)) {
+ fdmnt = is_block_device(path);
+ if (fdmnt == 1) {
int ret;
ret = get_btrfs_mount(path, mp, sizeof(mp));
return -1;
}
fdmnt = open_file_or_dir(mp, dirstream);
- } else {
+ } else if (fdmnt == 0) {
fdmnt = open_file_or_dir(path, dirstream);
}
memset(fi_args, 0, sizeof(*fi_args));
- if (is_block_device(path)) {
+ if (is_block_device(path) == 1) {
struct btrfs_super_block *disk_super;
char buf[BTRFS_SUPER_INFO_SIZE];
u64 devid;