From 0d4f14fef0e170b20e2532a68ea349b0147b0898 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sat, 4 Oct 2003 21:32:24 -0700 Subject: [PATCH] [PATCH] Get rid of magic numbers in fs From: Scharfe --- drivers/block/genhd.c | 4 ++-- fs/partitions/check.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/block/genhd.c b/drivers/block/genhd.c index 0cbabe9103d41..290622c35b939 100644 --- a/drivers/block/genhd.c +++ b/drivers/block/genhd.c @@ -250,7 +250,7 @@ static int show_partition(struct seq_file *part, void *v) { struct gendisk *sgp = v; int n; - char buf[64]; + char buf[BDEVNAME_SIZE]; if (&sgp->kobj.entry == block_subsys.kset.list.next) seq_puts(part, "major minor #blocks name\n\n"); @@ -472,7 +472,7 @@ static void diskstats_stop(struct seq_file *part, void *v) static int diskstats_show(struct seq_file *s, void *v) { struct gendisk *gp = v; - char buf[64]; + char buf[BDEVNAME_SIZE]; int n = 0; /* diff --git a/fs/partitions/check.c b/fs/partitions/check.c index 08585ea0bcf12..2de675b6aaf92 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c @@ -111,7 +111,7 @@ static int (*check_part[])(struct parsed_partitions *, struct block_device *) = }; /* - * disk_name() is used by partition check code and the md driver. + * disk_name() is used by partition check code and the genhd driver. * It formats the devicename of the indicated disk into * the supplied buffer (of size at least 32), and returns * a pointer to that same buffer (for convenience). -- 2.53.0