From 0056be14d7c90c6ce24a585662e07db9f0c61949 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 25 Oct 2000 02:24:33 +0000 Subject: [PATCH] ChangeLog, get_device_by_label.c: get_device_by_label.c: Apply fix from Erik Troan to support 16 character labels. --- misc/ChangeLog | 3 +++ misc/get_device_by_label.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/misc/ChangeLog b/misc/ChangeLog index 048b9a4..9417800 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,5 +1,8 @@ 2000-10-24 + * get_device_by_label.c: Apply fix from Erik Troan to support 16 + character labels. + * fsck.c (device_already_active): Add a special case check for MD devices, so we don't try to check them in parallel with other devices. diff --git a/misc/get_device_by_label.c b/misc/get_device_by_label.c index 72378e7..9ca404a 100644 --- a/misc/get_device_by_label.c +++ b/misc/get_device_by_label.c @@ -75,7 +75,9 @@ get_label_uuid(const char *device, char **label, char *uuid) { /* superblock is ext2 - now what is its label? */ memcpy(uuid, e2sb.s_uuid, sizeof(e2sb.s_uuid)); - *label = strdup(e2sb.s_volume_name); + + *label = calloc(sizeof(e2sb.s_volume_name) + 1, 1); + memcpy(*label, e2sb.s_volume_name, sizeof(e2sb.s_volume_name)); return 0; } -- 1.8.3.1