summaryrefslogtreecommitdiff
path: root/cmds-scrub.c
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2013-11-04 15:17:41 +0800
committerChris Mason <clm@fb.com>2014-01-31 08:22:03 -0800
commit1ecefced86538306d581b05105a93d1268ce0028 (patch)
tree2c056cfa051e67a6773add9f2b5b550470f1fdcd /cmds-scrub.c
parent457b1286dd9976efbfec25bb286ddc8cec410aa1 (diff)
downloadbtrfs-progs-1ecefced86538306d581b05105a93d1268ce0028.tar.gz
btrfs-progs: define BTRFS_UUID_UNPARSE_SIZE for uuid unparse buf size
we use 37 as the allocation size to hold the uuid_unparse, here it defines BTRFS_UUID_UNPARSE_SIZE for the same. Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'cmds-scrub.c')
-rw-r--r--cmds-scrub.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmds-scrub.c b/cmds-scrub.c
index 605af45..b933770 100644
--- a/cmds-scrub.c
+++ b/cmds-scrub.c
@@ -867,7 +867,7 @@ static void *scrub_progress_cycle(void *ctx)
int perr = 0; /* positive / pthread error returns */
int old;
int i;
- char fsid[37];
+ char fsid[BTRFS_UUID_UNPARSED_SIZE];
struct scrub_progress *sp;
struct scrub_progress *sp_last;
struct scrub_progress *sp_shared;
@@ -1089,7 +1089,7 @@ static int scrub_start(int argc, char **argv, int resume)
struct scrub_file_record **past_scrubs = NULL;
struct scrub_file_record *last_scrub = NULL;
char *datafile = strdup(SCRUB_DATA_FILE);
- char fsid[37];
+ char fsid[BTRFS_UUID_UNPARSED_SIZE];
char sock_path[BTRFS_PATH_NAME_MAX + 1] = "";
struct scrub_progress_cycle spc;
pthread_mutex_t spc_write_mutex = PTHREAD_MUTEX_INITIALIZER;
@@ -1615,7 +1615,7 @@ static int cmd_scrub_status(int argc, char **argv)
int print_raw = 0;
int do_stats_per_dev = 0;
int c;
- char fsid[37];
+ char fsid[BTRFS_UUID_UNPARSED_SIZE];
int fdres = -1;
int err = 0;
DIR *dirstream = NULL;