+2000-02-02 Theodore Ts'o <tytso@valinux.com>
+
+ * fsck.c (interpret_device): If there was an attempt to interpret
+ a device specification of the type "UUID=" or "LABEL=",
+ and it fails, check to see if /proc/partitions is
+ readable. If not, print a warning message about /proc
+ perhaps not being mounted, and exit.
+
+ * mke2fs.c (check_plausibility): Remove unneeded #include of
+ linux/fs.h. Add #define of MAJOR if necessary.
+
+ * partinfo.c: Remove unneeded #include of linux/fs.h
+
2000-01-19 Theodore Ts'o <tytso@valinux.com>
* tune2fs.c (usage): Update the usage message to correctly
dev = get_spec_by_uuid(spec+5);
else if (!strncmp(spec, "LABEL=", 6))
dev = get_spec_by_volume_label(spec+6);
+ else
+ return spec;
if (dev) {
free(spec);
- spec = dev;
+ return (dev);
+ }
+ /*
+ * Check to see if this was 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");
+ exit(1);
}
return spec;
}
#include <sys/ioctl.h>
#include <sys/types.h>
-#ifdef HAVE_LINUX_FS_H
-#include <linux/fs.h>
-#endif
#include <linux/ext2_fs.h>
#ifdef HAVE_LINUX_MAJOR_H
#include <linux/major.h>
static void check_plausibility(NOARGS)
{
#ifdef HAVE_LINUX_MAJOR_H
+#ifndef MAJOR
+#define MAJOR(dev) ((dev)>>8)
+#define MINOR(dev) ((dev) & 0xff)
+#endif
+
int val;
struct stat s;
#include <sys/types.h>
#include <fcntl.h>
#include <stdio.h>
-#include <linux/fs.h>
#include <linux/hdreg.h>
#include <unistd.h>
#include <stdlib.h>