]> err.no Git - util-linux/commitdiff
fsck: cosmetic changes (NLS, paths, ...)
authorKarel Zak <kzak@redhat.com>
Wed, 18 Feb 2009 14:34:51 +0000 (15:34 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 18 Feb 2009 14:34:51 +0000 (15:34 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
fsck/fsck.c
lib/ismounted.c

index 3d4a6c791d18b6cbb2b448993a1ac9989f3b4642..da5a2c85bd9d420798f306bf686d3cbbab83315b 100644 (file)
@@ -1110,10 +1110,10 @@ static void PRS(int argc, char *argv[])
                                 * Check to see if we failed because
                                 * /proc/partitions isn't found.
                                 */
-                               if (access("/proc/partitions", R_OK) < 0) {
-                                       fprintf(stderr, "Couldn't open /proc/partitions: %s\n",
-                                               strerror(errno));
-                                       fprintf(stderr, "Is /proc mounted?\n");
+                               if (access(_PATH_PROC_PARTITIONS, R_OK) < 0) {
+                                       fprintf(stderr, _("Couldn't open %s: %s\n"),
+                                               _PATH_PROC_PARTITIONS, strerror(errno));
+                                       fprintf(stderr, _("Is /proc mounted?\n"));
                                        exit(EXIT_ERROR);
                                }
                                /*
@@ -1122,10 +1122,10 @@ static void PRS(int argc, char *argv[])
                                 */
                                if (geteuid())
                                        fprintf(stderr,
-               "Must be root to scan for matching filesystems: %s\n", arg);
+               _("Must be root to scan for matching filesystems: %s\n"), arg);
                                else
                                        fprintf(stderr,
-               "Couldn't find matching filesystem: %s\n", arg);
+               _("Couldn't find matching filesystem: %s\n"), arg);
                                exit(EXIT_ERROR);
                        }
                        devices[num_devices++] = dev ? dev : string_copy(arg);
@@ -1253,7 +1253,7 @@ int main(int argc, char *argv[])
        PRS(argc, argv);
 
        if (!notitle)
-               printf("fsck from %s\n", PACKAGE_STRING);
+               printf(_("fsck from %s\n"), PACKAGE_STRING);
 
        fstab = getenv("FSTAB_FILE");
        if (!fstab)
@@ -1265,7 +1265,7 @@ int main(int argc, char *argv[])
                fsck_path = malloc (strlen (fsck_prefix_path) + 1 +
                                    strlen (oldpath) + 1);
                if (!fsck_path) {
-                       fprintf(stderr, "%s: Unable to allocate memory for fsck_path\n", progname);
+                       fprintf(stderr, _("%s: Unable to allocate memory for fsck_path\n"), progname);
                        exit(EXIT_ERROR);
                }
                strcpy (fsck_path, fsck_prefix_path);
@@ -1323,3 +1323,4 @@ int main(int argc, char *argv[])
        fsprobe_exit();
        return status;
 }
+
index 85f4ab30cfaf451bc8e900d79b1ebc85604608a3..4c164a9546b3c595f641717021c8cef3ea9f4b7e 100644 (file)
@@ -17,6 +17,7 @@
 #include <sys/stat.h>
 #include <ctype.h>
 
+#include "pathnames.h"
 #include "ismounted.h"
 
 /*
@@ -66,7 +67,7 @@ static int check_mntent_file(const char *mtab_file, const char *file,
        int             retval = 0;
        dev_t           file_dev=0, file_rdev=0;
        ino_t           file_ino=0;
-       FILE            *f;
+       FILE            *f;
        char            buf[1024], *device = 0, *mnt_dir = 0, *cp;
 
        *mount_flags = 0;
@@ -172,13 +173,13 @@ int is_mounted(const char *file)
        int     mount_flags = 0;
 
 #ifdef __linux__
-       retval = check_mntent_file("/proc/mounts", file, &mount_flags);
+       retval = check_mntent_file(_PATH_PROC_MOUNTS, file, &mount_flags);
        if (retval)
                return 0;
        if (mount_flags)
                return 1;
 #endif /* __linux__ */
-       retval = check_mntent_file("/etc/mtab", file, &mount_flags);
+       retval = check_mntent_file(_PATH_MOUNTED, file, &mount_flags);
        if (retval)
                return 0;
        return mount_flags;