btrfs-progs: remove extra newline from messages
The common message helpers add the newline. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
a2883ea16d
commit
86d2e4b64b
|
@ -4526,7 +4526,7 @@ extref:
|
|||
len = ref_namelen;
|
||||
} else {
|
||||
len = BTRFS_NAME_LEN;
|
||||
warning("Warning: root %llu INODE %s[%llu %llu] name too long\n",
|
||||
warning("root %llu INODE %s[%llu %llu] name too long",
|
||||
root->objectid,
|
||||
key->type == BTRFS_INODE_REF_KEY ?
|
||||
"REF" : "EXTREF",
|
||||
|
|
|
@ -149,7 +149,7 @@ static int get_df(int fd, struct btrfs_ioctl_space_args **sargs_ret)
|
|||
|
||||
ret = ioctl(fd, BTRFS_IOC_SPACE_INFO, sargs);
|
||||
if (ret < 0) {
|
||||
error("cannot get space info: %s\n", strerror(errno));
|
||||
error("cannot get space info: %s", strerror(errno));
|
||||
free(sargs);
|
||||
return -errno;
|
||||
}
|
||||
|
@ -875,7 +875,7 @@ devs_only:
|
|||
ret = btrfs_scan_devices();
|
||||
|
||||
if (ret) {
|
||||
error("blkid device scan returned %d\n", ret);
|
||||
error("blkid device scan returned %d", ret);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1116,7 +1116,7 @@ static int cmd_filesystem_defrag(int argc, char **argv)
|
|||
dirstream = NULL;
|
||||
fd = open_file_or_dir(argv[i], &dirstream);
|
||||
if (fd < 0) {
|
||||
error("cannot open %s: %s\n", argv[i],
|
||||
error("cannot open %s: %s", argv[i],
|
||||
strerror(errno));
|
||||
defrag_global_errors++;
|
||||
close_file_or_dir(fd, dirstream);
|
||||
|
@ -1130,7 +1130,7 @@ static int cmd_filesystem_defrag(int argc, char **argv)
|
|||
continue;
|
||||
}
|
||||
if (!(S_ISDIR(st.st_mode) || S_ISREG(st.st_mode))) {
|
||||
error("%s is not a directory or a regular file\n",
|
||||
error("%s is not a directory or a regular file",
|
||||
argv[i]);
|
||||
defrag_global_errors++;
|
||||
close_file_or_dir(fd, dirstream);
|
||||
|
|
|
@ -269,7 +269,7 @@ int cmd_inspect_dump_tree(int argc, char **argv)
|
|||
tree_id = treeid_from_string(optarg, &end);
|
||||
|
||||
if (!tree_id) {
|
||||
error("unrecognized tree id: %s\n",
|
||||
error("unrecognized tree id: %s",
|
||||
optarg);
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ static int finish_subvol(struct btrfs_receive *r)
|
|||
O_RDONLY | O_NOATIME);
|
||||
if (subvol_fd < 0) {
|
||||
ret = -errno;
|
||||
error("cannot open %s: %s\n",
|
||||
error("cannot open %s: %s",
|
||||
r->cur_subvol_path, strerror(-ret));
|
||||
goto out;
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ static int process_subvol(const char *path, const u8 *uuid, u64 ctransid,
|
|||
} else {
|
||||
ret = path_cat_out(r->cur_subvol_path, r->dest_dir_path, path);
|
||||
if (ret < 0) {
|
||||
error("subvol: path invalid: %s\n", path);
|
||||
error("subvol: path invalid: %s", path);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
@ -707,7 +707,7 @@ static int process_write(const char *path, const void *data, u64 offset,
|
|||
offset + pos);
|
||||
if (w < 0) {
|
||||
ret = -errno;
|
||||
error("writing to %s failed: %s\n",
|
||||
error("writing to %s failed: %s",
|
||||
path, strerror(-ret));
|
||||
goto out;
|
||||
}
|
||||
|
@ -793,7 +793,7 @@ static int process_clone(const char *path, u64 offset, u64 len,
|
|||
ret = ioctl(r->write_fd, BTRFS_IOC_CLONE_RANGE, &clone_args);
|
||||
if (ret < 0) {
|
||||
ret = -errno;
|
||||
error("failed to clone extents to %s\n%s\n",
|
||||
error("failed to clone extents to %s\n%s",
|
||||
path, strerror(-ret));
|
||||
goto out;
|
||||
}
|
||||
|
|
|
@ -436,7 +436,7 @@ static int print_replace_status(int fd, const char *path, int once)
|
|||
printf("Never started");
|
||||
break;
|
||||
default:
|
||||
error("unknown status from ioctl DEV_REPLACE_STATUS on '%s': %llu\n",
|
||||
error("unknown status from ioctl DEV_REPLACE_STATUS on '%s': %llu",
|
||||
path, status->replace_state);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -330,7 +330,7 @@ static int copy_one_extent(struct btrfs_root *root, int fd,
|
|||
|
||||
inbuf = malloc(size_left);
|
||||
if (!inbuf) {
|
||||
error("not enough memory\n");
|
||||
error("not enough memory");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
@ -486,7 +486,7 @@ static int set_file_xattrs(struct btrfs_root *root, u64 inode,
|
|||
do {
|
||||
ret = next_leaf(root, &path);
|
||||
if (ret < 0) {
|
||||
error("searching for extended attributes: %d\n",
|
||||
error("searching for extended attributes: %d",
|
||||
ret);
|
||||
goto out;
|
||||
} else if (ret) {
|
||||
|
|
|
@ -236,7 +236,7 @@ static void *dump_thread(void *arg)
|
|||
rbytes = read(sctx->send_fd, buf, sizeof(buf));
|
||||
if (rbytes < 0) {
|
||||
ret = -errno;
|
||||
error("failed to read stream from kernel: %s\n",
|
||||
error("failed to read stream from kernel: %s",
|
||||
strerror(-ret));
|
||||
goto out;
|
||||
}
|
||||
|
|
|
@ -923,10 +923,10 @@ static int cmd_subvol_show(int argc, char **argv)
|
|||
ret = get_subvol_info(fullpath, &get_ri);
|
||||
if (ret) {
|
||||
if (ret < 0) {
|
||||
error("Failed to get subvol info %s: %s\n",
|
||||
error("Failed to get subvol info %s: %s",
|
||||
fullpath, strerror(-ret));
|
||||
} else {
|
||||
error("Failed to get subvol info %s: %d\n",
|
||||
error("Failed to get subvol info %s: %d",
|
||||
fullpath, ret);
|
||||
}
|
||||
return ret;
|
||||
|
@ -1234,7 +1234,7 @@ static int cmd_subvol_sync(int argc, char **argv)
|
|||
}
|
||||
if (id < BTRFS_FIRST_FREE_OBJECTID
|
||||
|| id > BTRFS_LAST_FREE_OBJECTID) {
|
||||
error("subvolume id %s out of range\n", arg);
|
||||
error("subvolume id %s out of range", arg);
|
||||
ret = 1;
|
||||
goto out;
|
||||
}
|
||||
|
|
|
@ -2156,7 +2156,7 @@ static int search_for_chunk_blocks(struct mdrestore_struct *mdres,
|
|||
bytenr = current_cluster;
|
||||
while (1) {
|
||||
if (fseek(mdres->in, current_cluster, SEEK_SET)) {
|
||||
error("seek failed: %s\n", strerror(errno));
|
||||
error("seek failed: %s", strerror(errno));
|
||||
ret = -EIO;
|
||||
break;
|
||||
}
|
||||
|
@ -2303,7 +2303,7 @@ static int build_chunk_tree(struct mdrestore_struct *mdres,
|
|||
break;
|
||||
bytenr += le32_to_cpu(item->size);
|
||||
if (fseek(mdres->in, le32_to_cpu(item->size), SEEK_CUR)) {
|
||||
error("seek failed: %s\n", strerror(errno));
|
||||
error("seek failed: %s", strerror(errno));
|
||||
return -EIO;
|
||||
}
|
||||
}
|
||||
|
@ -2546,7 +2546,7 @@ static int restore_metadump(const char *input, FILE *out, int old_restore,
|
|||
}
|
||||
|
||||
if (in != stdin && fseek(in, 0, SEEK_SET)) {
|
||||
error("seek failed: %s\n", strerror(errno));
|
||||
error("seek failed: %s", strerror(errno));
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
|
@ -1496,7 +1496,7 @@ static int repair_qgroup_info(struct btrfs_fs_info *info,
|
|||
key.offset = count->qgroupid;
|
||||
ret = btrfs_search_slot(trans, root, &key, &path, 0, 1);
|
||||
if (ret) {
|
||||
error("Could not find disk item for qgroup %llu/%llu.\n",
|
||||
error("could not find disk item for qgroup %llu/%llu",
|
||||
btrfs_qgroup_level(count->qgroupid),
|
||||
btrfs_qgroup_subvid(count->qgroupid));
|
||||
if (ret > 0)
|
||||
|
@ -1550,7 +1550,7 @@ static int repair_qgroup_status(struct btrfs_fs_info *info)
|
|||
key.offset = 0;
|
||||
ret = btrfs_search_slot(trans, root, &key, &path, 0, 1);
|
||||
if (ret) {
|
||||
error("Could not find qgroup status item\n");
|
||||
error("could not find qgroup status item");
|
||||
if (ret > 0)
|
||||
ret = -ENOENT;
|
||||
goto out;
|
||||
|
|
Loading…
Reference in New Issue