mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-23 22:53:35 +00:00
btrfs-progs: Unify the messy error message formats
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
parent
5374ebe042
commit
6452351060
@ -128,14 +128,14 @@ static int cmd_subvol_create(int argc, char **argv)
|
||||
|
||||
if (!strcmp(newname, ".") || !strcmp(newname, "..") ||
|
||||
strchr(newname, '/') ){
|
||||
fprintf(stderr, "ERROR: uncorrect subvolume name ('%s')\n",
|
||||
fprintf(stderr, "ERROR: incorrect subvolume name '%s'\n",
|
||||
newname);
|
||||
goto out;
|
||||
}
|
||||
|
||||
len = strlen(newname);
|
||||
if (len == 0 || len >= BTRFS_VOL_NAME_MAX) {
|
||||
fprintf(stderr, "ERROR: subvolume name too long ('%s)\n",
|
||||
fprintf(stderr, "ERROR: subvolume name too long '%s'\n",
|
||||
newname);
|
||||
goto out;
|
||||
}
|
||||
@ -303,7 +303,7 @@ again:
|
||||
|
||||
if (!strcmp(vname, ".") || !strcmp(vname, "..") ||
|
||||
strchr(vname, '/')) {
|
||||
fprintf(stderr, "ERROR: incorrect subvolume name ('%s')\n",
|
||||
fprintf(stderr, "ERROR: incorrect subvolume name '%s'\n",
|
||||
vname);
|
||||
ret = 1;
|
||||
goto out;
|
||||
@ -311,7 +311,7 @@ again:
|
||||
|
||||
len = strlen(vname);
|
||||
if (len == 0 || len >= BTRFS_VOL_NAME_MAX) {
|
||||
fprintf(stderr, "ERROR: snapshot name too long ('%s)\n",
|
||||
fprintf(stderr, "ERROR: snapshot name too long '%s'\n",
|
||||
vname);
|
||||
ret = 1;
|
||||
goto out;
|
||||
@ -674,14 +674,14 @@ static int cmd_snapshot(int argc, char **argv)
|
||||
|
||||
if (!strcmp(newname, ".") || !strcmp(newname, "..") ||
|
||||
strchr(newname, '/') ){
|
||||
fprintf(stderr, "ERROR: incorrect snapshot name ('%s')\n",
|
||||
fprintf(stderr, "ERROR: incorrect snapshot name '%s'\n",
|
||||
newname);
|
||||
goto out;
|
||||
}
|
||||
|
||||
len = strlen(newname);
|
||||
if (len == 0 || len >= BTRFS_VOL_NAME_MAX) {
|
||||
fprintf(stderr, "ERROR: snapshot name too long ('%s)\n",
|
||||
fprintf(stderr, "ERROR: snapshot name too long '%s'\n",
|
||||
newname);
|
||||
goto out;
|
||||
}
|
||||
@ -929,7 +929,7 @@ static int cmd_subvol_show(int argc, char **argv)
|
||||
|
||||
ret = find_mount_root(fullpath, &mnt);
|
||||
if (ret < 0) {
|
||||
fprintf(stderr, "ERROR: find_mount_root failed on %s: "
|
||||
fprintf(stderr, "ERROR: find_mount_root failed on '%s': "
|
||||
"%s\n", fullpath, strerror(-ret));
|
||||
goto out;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user