-$Id: CHANGES,v 1.91 2000/11/29 10:13:41 stelian Exp $
+$Id: CHANGES,v 1.92 2000/11/30 09:53:10 stelian Exp $
Changes between versions 0.4b20 and 0.4b21 (released ?????????????????)
=======================================================================
the previous version. Thanks to Andreas Dilger
<adilger@turbolinux.com> for his help on this one.
+2. Fixed again a compilation problem when using old e2fs
+ headers (filesystem label related). Thanks to many users
+ who reported this stupid error.
+
Changes between versions 0.4b19 and 0.4b20 (released November 10, 2000)
=======================================================================
+/*
+ * Ported to Linux's Second Extended File System as part of the
+ * dump and restore backup suit
+ * 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@misiek.eu.org>
+ * - added Native Language Support
+ * 2000-01-20 James Antill <james@and.org>
+ * - Added error message if /proc/partitions cannot be opened
+ * 2000-05-09 Erik Troan <ewt@redhat.com>
+ * - Added cache for UUID and disk labels
+ * Wed Aug 16 2000 Erik Troan <ewt@redhat.com>
+ * - Ported to dump/restore
+ * Stelian Pop <pop@cybercable.fr> - Alcôve <www.alcove.fr>, 2000
+ *
+ * $Id: bylabel.h,v 1.2 2000/11/30 09:53:13 stelian Exp $
+ */
+
+#ifndef _BYLABEL_H_
+#define _BYLABEL_H_
+
const char * get_device_name(const char * item);
+const char * get_device_label(const char * spec);
+
+#endif /* !_BYLABEL_H_ */
return rc;
}
+
+const char *
+get_device_label(const char * spec) {
+ struct uuidCache_s *uc;
+
+ uuidcache_init();
+ uc = uuidCache;
+
+ while(uc) {
+ if (!strcmp(spec, uc->device))
+ return uc->label[0] == '\0' ? NULL : strdup(uc->label);
+ uc = uc->next;
+ }
+ return NULL;
+}
#ifndef lint
static const char rcsid[] =
- "$Id: main.c,v 1.29 2000/11/10 14:42:25 stelian Exp $";
+ "$Id: main.c,v 1.30 2000/11/30 09:53:14 stelian Exp $";
#endif /* not lint */
#include <sys/param.h>
}
/* if no user label specified, use ext2 filesystem label if available */
if (spcl.c_label[0] == '\0') {
- if (fs->super->s_volume_name[0] != '\0') {
- strncpy(spcl.c_label, fs->super->s_volume_name,LBLSIZE);
+ const char *lbl;
+ if ( (lbl = get_device_label(disk)) != NULL) {
+ strncpy(spcl.c_label, lbl, LBLSIZE);
spcl.c_label[LBLSIZE-1] = '\0';
}
else