]> err.no Git - util-linux/commitdiff
mount: use MNTTYPE_SWAP (from mntent.h)
authorKarel Zak <kzak@redhat.com>
Wed, 28 Nov 2007 13:37:09 +0000 (14:37 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 28 Nov 2007 13:37:09 +0000 (14:37 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
mount/mount.c

index a28da486025693484546fe2fdf5aa18097d6444c..99ad9703364004395298323fc3cebc19f3f7e76e 100644 (file)
@@ -693,7 +693,7 @@ guess_fstype_by_devname(const char *devname)
       if (!type)
          printf (_("       I will try all types mentioned in %s or %s\n"),
                      _PATH_FILESYSTEMS, _PATH_PROC_FILESYSTEMS);
-      else if (!strcmp(type, "swap"))
+      else if (!strcmp(type, MNTTYPE_SWAP))
          printf (_("       and it looks like this is swapspace\n"));
       else
          printf (_("       I will try type %s\n"), type);
@@ -722,7 +722,7 @@ guess_fstype_and_mount(const char *spec, const char *node, const char **types,
    if (!*types && !(flags & MS_REMOUNT)) {
       *types = guess_fstype_by_devname(spec);
       if (*types) {
-         if (!strcmp(*types, "swap")) {
+         if (!strcmp(*types, MNTTYPE_SWAP)) {
              error(_("%s looks like swapspace - not mounted"), spec);
              *types = NULL;
              return 1;