]> git.wh0rd.org - dump.git/blobdiff - dump/main.c
Fix a compile problem (e2fs label related).
[dump.git] / dump / main.c
index 876ea22e6d6b4cdee8793434901e83ad83c75667..9f61fb686edcc4ae6ff56b6e201eb146eeb16c9d 100644 (file)
@@ -3,6 +3,7 @@
  *     dump and restore backup suit
  *     Remy Card <card@Linux.EU.Org>, 1994-1997
  *     Stelian Pop <pop@cybercable.fr>, 1999-2000
+ *     Stelian Pop <pop@cybercable.fr> - AlcĂ´ve <www.alcove.fr>, 2000
  */
 
 /*-
@@ -40,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: main.c,v 1.28 2000/11/10 13:52:43 stelian Exp $";
+       "$Id: main.c,v 1.30 2000/11/30 09:53:14 stelian Exp $";
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -512,8 +513,9 @@ main(int argc, char *argv[])
        }
        /* 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