* 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);
}
/*
*/
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);
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)
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);
fsprobe_exit();
return status;
}
+
#include <sys/stat.h>
#include <ctype.h>
+#include "pathnames.h"
#include "ismounted.h"
/*
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;
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;