forked from pool/e2fsprogs
Rev openSUSE:Factory/44 Md5 b32bdd77d30669f5be0f09398f7d17c4 2009-07-03 15:13:02 unknown None
This commit is contained in:
parent
245063496d
commit
5411f63aed
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -23,4 +23,3 @@
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
## Specific LFS patterns
|
||||
e2fsprogs-1.41.4.de.po filter=lfs diff=lfs merge=lfs -text
|
||||
e2fsprogs-no_cmd_hiding.patch filter=lfs diff=lfs merge=lfs -text
|
||||
|
@ -1,28 +0,0 @@
|
||||
Using uuidd
|
||||
-----------
|
||||
The uuidd is a solution to guarantee unique time-based UUIDs. In the
|
||||
past there was the problem that UUIDs created by libuuid have not been
|
||||
guaranteed to be unique if you run multiple processes/threads which
|
||||
create lots of UUIDs simultaneously. In order to use this daemon you
|
||||
have to run it with SUID/SGID bit set:
|
||||
|
||||
1. Modify your local permissions setting by adding the following
|
||||
line to your /etc/permissions.local
|
||||
/usr/sbin/uuidd uuidd:uuidd 6755
|
||||
|
||||
2. Set the permissions with
|
||||
$ chkstat --set /etc/permissions.local
|
||||
|
||||
3. enable the service uuidd either in YaST or with
|
||||
$ insserv uuidd
|
||||
|
||||
The daemon is designed to run on demand by default, this means
|
||||
it is started automatically by libuuid when needed and it
|
||||
terminates by default after 5 minutes of inactivity.
|
||||
However if you wish to run the daemon permanently you can
|
||||
set the parameter UUIDD_ON_DEMAND_ONLY in /etc/sysconfig/uuidd
|
||||
to "no".
|
||||
Note, the daemon is not needed in general to create time-based
|
||||
UUIDs, it is only needed to assure the uniqueness of UUIDs
|
||||
when creating lots of them in a short amount of time.
|
||||
|
@ -1,15 +0,0 @@
|
||||
Index: e2fsprogs-1.40.4/lib/uuid/uuidd.h
|
||||
===================================================================
|
||||
--- e2fsprogs-1.40.4.orig/lib/uuid/uuidd.h
|
||||
+++ e2fsprogs-1.40.4/lib/uuid/uuidd.h
|
||||
@@ -35,8 +35,8 @@
|
||||
#ifndef _UUID_UUIDD_H
|
||||
#define _UUID_UUIDD_H
|
||||
|
||||
-#define UUIDD_SOCKET_PATH "/var/lib/libuuid/request"
|
||||
-#define UUIDD_PIDFILE_PATH "/var/lib/libuuid/uuidd.pid"
|
||||
+#define UUIDD_SOCKET_PATH "/var/run/uuidd/request"
|
||||
+#define UUIDD_PIDFILE_PATH "/var/run/uuidd/uuidd.pid"
|
||||
#define UUIDD_PATH "/usr/sbin/uuidd"
|
||||
|
||||
#define UUIDD_OP_GETPID 0
|
@ -177,9 +177,9 @@ Index: e2fsprogs-1.41.1/e2fsck/unix.c
|
||||
#ifdef RESOURCE_TRACK
|
||||
init_resource_track(&ctx->global_rtrack, NULL);
|
||||
@@ -1242,6 +1245,7 @@ print_unsupp_features:
|
||||
if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
|
||||
fatal_error(ctx, 0);
|
||||
check_if_skip(ctx);
|
||||
check_resize_inode(ctx);
|
||||
+ sops->splash_off();
|
||||
if (bad_blocks_file)
|
||||
read_bad_blocks_file(ctx, bad_blocks_file, replace_bad_blocks);
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0366ef68b35ff094f5e6bce3b715d2291639732e384c25446833efe1db7c2f16
|
||||
size 3882283
|
3
e2fsprogs-1.41.7.tar.bz2
Normal file
3
e2fsprogs-1.41.7.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:44c5ba76534f2fce84d11d04b850422ac8f2b6c1bdb2f33bab0462d9b81022fd
|
||||
size 3893160
|
@ -1,373 +0,0 @@
|
||||
Index: e2fsprogs-1.41.1/misc/base_device.c
|
||||
===================================================================
|
||||
--- e2fsprogs-1.41.1.orig/misc/base_device.c 2008-08-28 16:26:31.000000000 +0200
|
||||
+++ e2fsprogs-1.41.1/misc/base_device.c 2008-09-04 15:08:22.000000000 +0200
|
||||
@@ -31,125 +31,169 @@
|
||||
#include "fsck.h"
|
||||
|
||||
/*
|
||||
- * Required for the uber-silly devfs /dev/ide/host1/bus2/target3/lun3
|
||||
- * pathames.
|
||||
+ * Same version as above but returns the devicenumber of
|
||||
+ * base device. Saner, no strings to free, works with everything.
|
||||
*/
|
||||
-static const char *devfs_hier[] = {
|
||||
- "host", "bus", "target", "lun", 0
|
||||
-};
|
||||
-
|
||||
-char *base_device(const char *device)
|
||||
+dev_t base_devt(const char *device)
|
||||
{
|
||||
- char *str, *cp;
|
||||
- const char **hier, *disk;
|
||||
- int len;
|
||||
-
|
||||
- str = malloc(strlen(device)+1);
|
||||
- if (!str)
|
||||
- return NULL;
|
||||
- strcpy(str, device);
|
||||
- cp = str;
|
||||
-
|
||||
- /* Skip over /dev/; if it's not present, give up. */
|
||||
- if (strncmp(cp, "/dev/", 5) != 0)
|
||||
- goto errout;
|
||||
- cp += 5;
|
||||
-
|
||||
- /* Skip over /dev/dsk/... */
|
||||
- if (strncmp(cp, "dsk/", 4) == 0)
|
||||
- cp += 4;
|
||||
-
|
||||
- /*
|
||||
- * For md devices, we treat them all as if they were all
|
||||
- * on one disk, since we don't know how to parallelize them.
|
||||
- */
|
||||
- if (cp[0] == 'm' && cp[1] == 'd') {
|
||||
- *(cp+2) = 0;
|
||||
- return str;
|
||||
+ struct stat statbuf;
|
||||
+ unsigned int dev_major, dev_minor, disk_minor;
|
||||
+
|
||||
+ if (stat(device, &statbuf) < 0) {
|
||||
+ fprintf(stderr,"error on stat() %s: %s\n",
|
||||
+ device, strerror(errno));
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (!S_ISBLK(statbuf.st_mode))
|
||||
+ return 0;
|
||||
+
|
||||
+ dev_major = major(statbuf.st_mode);
|
||||
+ dev_minor = minor(statbuf.st_mode);
|
||||
+
|
||||
+ switch (dev_major) {
|
||||
+ case 3: /* IDE / ATAPI disks */
|
||||
+ case 13: /* PC MFM disks */
|
||||
+ case 14: /* BIOS HD disks */
|
||||
+ case 21: /* Acorn MFM disks */
|
||||
+ case 22: /* 2nd IDE / ATAPI controller */
|
||||
+ case 33: /* 3rd IDE / ATAPI controller */
|
||||
+ case 34: /* 4th IDE / ATAPI controller */
|
||||
+ case 56: /* 5th IDE / ATAPI controller */
|
||||
+ case 57: /* 6th IDE / ATAPI controller */
|
||||
+ case 88: /* 7th IDE / ATAPI controller */
|
||||
+ case 89: /* 8th IDE / ATAPI controller */
|
||||
+ case 90: /* 9th IDE / ATAPI controller */
|
||||
+ case 91: /* 10th IDE / ATAPI controller */
|
||||
+ case 36: /* MCA ESDI disks */
|
||||
+ disk_minor = dev_minor - (dev_minor % 64);
|
||||
+ break;
|
||||
+ case 160: /* Carmel 8-port SATA disks, 1st controller */
|
||||
+ case 161: /* Carmel 8-port SATA disks, 2nd controller */
|
||||
+ disk_minor = dev_minor - (dev_minor % 32);
|
||||
+ break;
|
||||
+ case 8: /* SCSI devices */
|
||||
+ case 28: /* Atari ASCI disks */
|
||||
+ case 44: /* FTL disks */
|
||||
+ case 45: /* Parallel port IDE disks */
|
||||
+ case 65: /* SCSI devices */
|
||||
+ case 66: /* SCSI devices */
|
||||
+ case 67: /* SCSI devices */
|
||||
+ case 68: /* SCSI devices */
|
||||
+ case 69: /* SCSI devices */
|
||||
+ case 70: /* SCSI devices */
|
||||
+ case 71: /* SCSI devices */
|
||||
+ case 72: /* Compaq IDA, 1st controller */
|
||||
+ case 73: /* Compaq IDA, 2nd controller */
|
||||
+ case 74: /* Compaq IDA, 3rd controller */
|
||||
+ case 75: /* Compaq IDA, 4th controller */
|
||||
+ case 76: /* Compaq IDA, 5th controller */
|
||||
+ case 77: /* Compaq IDA, 6th controller */
|
||||
+ case 78: /* Compaq IDA, 7th controller */
|
||||
+ case 79: /* Compaq IDA, 8th controller */
|
||||
+ case 80: /* I2O disks */
|
||||
+ case 81: /* I2O disks */
|
||||
+ case 82: /* I2O disks */
|
||||
+ case 83: /* I2O disks */
|
||||
+ case 84: /* I2O disks */
|
||||
+ case 85: /* I2O disks */
|
||||
+ case 86: /* I2O disks */
|
||||
+ case 87: /* I2O disks */
|
||||
+ case 93: /* NAND FTL disks */
|
||||
+ case 96: /* Inverse NAND FTL disks */
|
||||
+ case 98: /* User-mode Virtual disks */
|
||||
+ case 101: /* AMI RAID controller */
|
||||
+ case 102: /* Compressed block device */
|
||||
+ case 104: /* Compaq CCISS, 1st controller */
|
||||
+ case 105: /* Compaq CCISS, 2nd controller */
|
||||
+ case 106: /* Compaq CCISS, 3rd controller */
|
||||
+ case 107: /* Compaq CCISS, 4th controller */
|
||||
+ case 108: /* Compaq CCISS, 5th controller */
|
||||
+ case 109: /* Compaq CCISS, 6th controller */
|
||||
+ case 110: /* Compaq CCISS, 7th controller */
|
||||
+ case 111: /* Compaq CCISS, 8th controller */
|
||||
+ case 114: /* ATARAID devices */
|
||||
+ case 128: /* SCSI disks */
|
||||
+ case 129: /* SCSI disks */
|
||||
+ case 130: /* SCSI disks */
|
||||
+ case 131: /* SCSI disks */
|
||||
+ case 132: /* SCSI disks */
|
||||
+ case 133: /* SCSI disks */
|
||||
+ case 134: /* SCSI disks */
|
||||
+ case 135: /* SCSI disks */
|
||||
+ case 153: /* Enhanced Metadisk RAID */
|
||||
+ disk_minor = dev_minor - (dev_minor % 16);
|
||||
+ break;
|
||||
+ case 48: /* Mylex DAC960 RAID, 1st controller */
|
||||
+ case 49: /* Mylex DAC960 RAID, 2nd controller */
|
||||
+ case 50: /* Mylex DAC960 RAID, 3rd controller */
|
||||
+ case 51: /* Mylex DAC960 RAID, 4th controller */
|
||||
+ case 52: /* Mylex DAC960 RAID, 5th controller */
|
||||
+ case 53: /* Mylex DAC960 RAID, 6th controller */
|
||||
+ case 54: /* Mylex DAC960 RAID, 7th controller */
|
||||
+ case 55: /* Mylex DAC960 RAID, 8th controller */
|
||||
+ case 112: /* IBM iSeries virtual disks */
|
||||
+ case 136: /* Mylex DAC960 RAID, 9th controller */
|
||||
+ case 137: /* Mylex DAC960 RAID, 10th controller */
|
||||
+ case 138: /* Mylex DAC960 RAID, 11th controller */
|
||||
+ case 139: /* Mylex DAC960 RAID, 12th controller */
|
||||
+ case 140: /* Mylex DAC960 RAID, 13th controller */
|
||||
+ case 141: /* Mylex DAC960 RAID, 14th controller */
|
||||
+ case 142: /* Mylex DAC960 RAID, 15th controller */
|
||||
+ case 143: /* Mylex DAC960 RAID, 16th controller */
|
||||
+ case 180: /* USB Block devices */
|
||||
+ disk_minor = dev_minor - (dev_minor % 8);
|
||||
+ break;
|
||||
+ case 94: /* IBM S/390 DASD */
|
||||
+ disk_minor = dev_minor - (dev_minor % 4);
|
||||
+ break;
|
||||
+ default:
|
||||
+ disk_minor = dev_minor;
|
||||
+ break;
|
||||
}
|
||||
+
|
||||
+ return makedev(dev_major,disk_minor);
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * Check whether two given devices match.
|
||||
+ * Rather then check for the device names
|
||||
+ * (which wouldn't work with udev anyway)
|
||||
+ * check whether the device numbers are
|
||||
+ * identical.
|
||||
+ */
|
||||
+int match_device(const char *dev1, const char *dev2)
|
||||
+{
|
||||
+ struct stat statbuf;
|
||||
+ dev_t saved_devt;
|
||||
+ int ret = 0;
|
||||
|
||||
- /* Handle DAC 960 devices */
|
||||
- if (strncmp(cp, "rd/", 3) == 0) {
|
||||
- cp += 3;
|
||||
- if (cp[0] != 'c' || cp[2] != 'd' ||
|
||||
- !isdigit(cp[1]) || !isdigit(cp[3]))
|
||||
- goto errout;
|
||||
- *(cp+4) = 0;
|
||||
- return str;
|
||||
+ if (stat(dev1, &statbuf) < 0) {
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
- /* Now let's handle /dev/hd* and /dev/sd* devices.... */
|
||||
- if ((cp[0] == 'h' || cp[0] == 's') && (cp[1] == 'd')) {
|
||||
- cp += 2;
|
||||
- /* If there's a single number after /dev/hd, skip it */
|
||||
- if (isdigit(*cp))
|
||||
- cp++;
|
||||
- /* What follows must be an alpha char, or give up */
|
||||
- if (!isalpha(*cp))
|
||||
- goto errout;
|
||||
- *(cp + 1) = 0;
|
||||
- return str;
|
||||
- }
|
||||
+ if (!S_ISBLK(statbuf.st_mode))
|
||||
+ return 0;
|
||||
|
||||
- /* Now let's handle devfs (ugh) names */
|
||||
- len = 0;
|
||||
- if (strncmp(cp, "ide/", 4) == 0)
|
||||
- len = 4;
|
||||
- if (strncmp(cp, "scsi/", 5) == 0)
|
||||
- len = 5;
|
||||
- if (len) {
|
||||
- cp += len;
|
||||
- /*
|
||||
- * Now we proceed down the expected devfs hierarchy.
|
||||
- * i.e., .../host1/bus2/target3/lun4/...
|
||||
- * If we don't find the expected token, followed by
|
||||
- * some number of digits at each level, abort.
|
||||
- */
|
||||
- for (hier = devfs_hier; *hier; hier++) {
|
||||
- len = strlen(*hier);
|
||||
- if (strncmp(cp, *hier, len) != 0)
|
||||
- goto errout;
|
||||
- cp += len;
|
||||
- while (*cp != '/' && *cp != 0) {
|
||||
- if (!isdigit(*cp))
|
||||
- goto errout;
|
||||
- cp++;
|
||||
- }
|
||||
- cp++;
|
||||
- }
|
||||
- *(cp - 1) = 0;
|
||||
- return str;
|
||||
- }
|
||||
+ saved_devt = statbuf.st_rdev;
|
||||
|
||||
- /* Now handle devfs /dev/disc or /dev/disk names */
|
||||
- disk = 0;
|
||||
- if (strncmp(cp, "discs/", 6) == 0)
|
||||
- disk = "disc";
|
||||
- else if (strncmp(cp, "disks/", 6) == 0)
|
||||
- disk = "disk";
|
||||
- if (disk) {
|
||||
- cp += 6;
|
||||
- if (strncmp(cp, disk, 4) != 0)
|
||||
- goto errout;
|
||||
- cp += 4;
|
||||
- while (*cp != '/' && *cp != 0) {
|
||||
- if (!isdigit(*cp))
|
||||
- goto errout;
|
||||
- cp++;
|
||||
- }
|
||||
- *cp = 0;
|
||||
- return str;
|
||||
+ if (stat(dev2, &statbuf) < 0) {
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
-errout:
|
||||
- free(str);
|
||||
- return NULL;
|
||||
+ if (!S_ISBLK(statbuf.st_mode))
|
||||
+ return 0;
|
||||
+
|
||||
+ if (saved_devt == statbuf.st_rdev)
|
||||
+ ret = 1;
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
- const char *base;
|
||||
+ dev_t base;
|
||||
char buf[256], *cp;
|
||||
|
||||
while (1) {
|
||||
@@ -161,8 +205,8 @@ int main(int argc, char** argv)
|
||||
cp = strchr(buf, '\t');
|
||||
if (cp)
|
||||
*cp = 0;
|
||||
- base = base_device(buf);
|
||||
- printf("%s\t%s\n", buf, base ? base : "NONE");
|
||||
+ base = base_devt(buf);
|
||||
+ printf("%s\t0x%04x\n", buf, base);
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
Index: e2fsprogs-1.41.1/misc/fsck.c
|
||||
===================================================================
|
||||
--- e2fsprogs-1.41.1.orig/misc/fsck.c 2008-08-28 16:26:31.000000000 +0200
|
||||
+++ e2fsprogs-1.41.1/misc/fsck.c 2008-09-04 15:23:38.000000000 +0200
|
||||
@@ -237,8 +237,6 @@ static void free_instance(struct fsck_in
|
||||
free(i->prog);
|
||||
if (i->device)
|
||||
free(i->device);
|
||||
- if (i->base_device)
|
||||
- free(i->base_device);
|
||||
free(i);
|
||||
return;
|
||||
}
|
||||
@@ -390,7 +388,7 @@ static struct fs_info *lookup(char *file
|
||||
return NULL;
|
||||
|
||||
for (fs = filesys_info; fs; fs = fs->next) {
|
||||
- if (!strcmp(filesys, fs->device) ||
|
||||
+ if (match_device(filesys, fs->device) ||
|
||||
(fs->mountpt && !strcmp(filesys, fs->mountpt)))
|
||||
break;
|
||||
}
|
||||
@@ -514,7 +512,7 @@ static int execute(const char *type, con
|
||||
inst->prog = string_copy(prog);
|
||||
inst->type = string_copy(type);
|
||||
inst->device = string_copy(device);
|
||||
- inst->base_device = base_device(device);
|
||||
+ inst->base_devt = base_devt(device);
|
||||
inst->start_time = time(0);
|
||||
inst->next = NULL;
|
||||
|
||||
@@ -927,7 +925,7 @@ static int ignore(struct fs_info *fs)
|
||||
static int device_already_active(char *device)
|
||||
{
|
||||
struct fsck_instance *inst;
|
||||
- char *base;
|
||||
+ dev_t disk_devt;
|
||||
|
||||
if (force_all_parallel)
|
||||
return 0;
|
||||
@@ -940,20 +938,18 @@ static int device_already_active(char *d
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
- base = base_device(device);
|
||||
+ disk_devt = base_devt(device);
|
||||
/*
|
||||
* If we don't know the base device, assume that the device is
|
||||
* already active if there are any fsck instances running.
|
||||
*/
|
||||
- if (!base)
|
||||
+ if (!disk_devt)
|
||||
return (instance_list != 0);
|
||||
for (inst = instance_list; inst; inst = inst->next) {
|
||||
- if (!inst->base_device || !strcmp(base, inst->base_device)) {
|
||||
- free(base);
|
||||
+ if (!inst->base_devt || disk_devt == inst->base_devt) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
- free(base);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Index: e2fsprogs-1.41.1/misc/fsck.h
|
||||
===================================================================
|
||||
--- e2fsprogs-1.41.1.orig/misc/fsck.h 2008-08-28 05:07:00.000000000 +0200
|
||||
+++ e2fsprogs-1.41.1/misc/fsck.h 2008-09-04 14:57:13.000000000 +0200
|
||||
@@ -62,12 +62,12 @@ struct fsck_instance {
|
||||
char * prog;
|
||||
char * type;
|
||||
char * device;
|
||||
- char * base_device;
|
||||
+ dev_t base_devt;
|
||||
struct fsck_instance *next;
|
||||
};
|
||||
|
||||
-extern char *base_device(const char *device);
|
||||
-extern const char *identify_fs(const char *fs_name, const char *fs_types);
|
||||
+extern dev_t base_devt(const char *device);
|
||||
+extern int match_device(const char *dev1, const char *dev2);
|
||||
|
||||
/* ismounted.h */
|
||||
extern int is_mounted(const char *file);
|
@ -1,283 +0,0 @@
|
||||
Index: e2fsprogs-1.41.4/misc/Makefile.in
|
||||
===================================================================
|
||||
--- e2fsprogs-1.41.4.orig/misc/Makefile.in 2008-11-15 18:33:33.000000000 +0100
|
||||
+++ e2fsprogs-1.41.4/misc/Makefile.in 2009-02-03 12:45:22.000000000 +0100
|
||||
@@ -40,7 +40,7 @@ UUIDD_OBJS= uuidd.o
|
||||
DUMPE2FS_OBJS= dumpe2fs.o
|
||||
BADBLOCKS_OBJS= badblocks.o
|
||||
E2IMAGE_OBJS= e2image.o
|
||||
-FSCK_OBJS= fsck.o base_device.o ismounted.o
|
||||
+FSCK_OBJS= fsck.o base_device.o ismounted.o fsck_volume_id.o
|
||||
BLKID_OBJS= blkid.o
|
||||
FILEFRAG_OBJS= filefrag.o
|
||||
E2UNDO_OBJS= e2undo.o
|
||||
@@ -81,6 +81,9 @@ PROFILED_DEPLIBS= $(PROFILED_LIBEXT2FS)
|
||||
STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
|
||||
STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
|
||||
|
||||
+LIBVOLID= -lvolume_id
|
||||
+DEPLIBVOLID=
|
||||
+
|
||||
LIBS_E2P= $(LIBE2P) $(LIBCOM_ERR)
|
||||
DEPLIBS_E2P= $(LIBE2P) $(LIBCOM_ERR)
|
||||
|
||||
@@ -184,10 +187,6 @@ base_device: base_device.c
|
||||
@$(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(srcdir)/base_device.c \
|
||||
-DDEBUG -o base_device
|
||||
|
||||
-check:: base_device
|
||||
- ./base_device < $(srcdir)/base_device.tst > base_device.out
|
||||
- cmp $(srcdir)/base_device.tst base_device.out
|
||||
-
|
||||
mklost+found: $(MKLPF_OBJS)
|
||||
@echo " LD $@"
|
||||
@$(CC) $(ALL_LDFLAGS) -o mklost+found $(MKLPF_OBJS) $(LIBINTL)
|
||||
@@ -250,14 +249,14 @@ dumpe2fs.profiled: $(PROFILED_DUMPE2FS_O
|
||||
$(PROFILED_DUMPE2FS_OBJS) $(PROFILED_LIBS) \
|
||||
$(PROFILED_LIBE2P) $(PROFILED_LIBUUID) $(LIBINTL)
|
||||
|
||||
-fsck: $(FSCK_OBJS) $(DEPLIBBLKID)
|
||||
+fsck: $(FSCK_OBJS) $(DEPLIBVOLID)
|
||||
@echo " LD $@"
|
||||
- @$(CC) $(ALL_LDFLAGS) -o fsck $(FSCK_OBJS) $(LIBBLKID) $(LIBINTL)
|
||||
+ @$(CC) $(ALL_LDFLAGS) -o fsck $(FSCK_OBJS) $(LIBVOLID) $(LIBINTL)
|
||||
|
||||
-fsck.profiled: $(PROFILED_FSCK_OBJS) $(PROFILED_DEPLIBBLKID)
|
||||
+fsck.profiled: $(PROFILED_FSCK_OBJS) $(DEPLIBVOLID)
|
||||
@echo " LD $@"
|
||||
@$(CC) $(ALL_LDFLAGS) -g -pg -o fsck.profiled $(PROFILED_FSCK_OBJS) \
|
||||
- $(PROFILED_LIBBLKID) $(LIBINTL)
|
||||
+ $(LIBVOLID) $(LIBINTL)
|
||||
|
||||
badblocks: $(BADBLOCKS_OBJS) $(DEPLIBS)
|
||||
@echo " LD $@"
|
||||
Index: e2fsprogs-1.41.4/misc/base_device.c
|
||||
===================================================================
|
||||
--- e2fsprogs-1.41.4.orig/misc/base_device.c 2009-02-03 12:24:08.000000000 +0100
|
||||
+++ e2fsprogs-1.41.4/misc/base_device.c 2009-02-03 12:24:48.000000000 +0100
|
||||
@@ -27,6 +27,8 @@
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
+#include <sys/stat.h>
|
||||
+#include <errno.h>
|
||||
|
||||
#include "fsck.h"
|
||||
|
||||
Index: e2fsprogs-1.41.4/misc/fsck.c
|
||||
===================================================================
|
||||
--- e2fsprogs-1.41.4.orig/misc/fsck.c 2009-02-03 12:24:08.000000000 +0100
|
||||
+++ e2fsprogs-1.41.4/misc/fsck.c 2009-02-03 12:24:48.000000000 +0100
|
||||
@@ -61,7 +61,6 @@
|
||||
#include "../version.h"
|
||||
#include "nls-enable.h"
|
||||
#include "fsck.h"
|
||||
-#include "blkid/blkid.h"
|
||||
|
||||
#ifndef _PATH_MNTTAB
|
||||
#define _PATH_MNTTAB "/etc/fstab"
|
||||
@@ -122,7 +121,6 @@ struct fs_info *filesys_info = NULL, *fi
|
||||
struct fsck_instance *instance_list;
|
||||
const char *fsck_prefix_path = "/sbin:/sbin/fs.d:/sbin/fs:/etc/fs:/etc";
|
||||
char *fsck_path = 0;
|
||||
-blkid_cache cache = NULL;
|
||||
|
||||
static char *string_copy(const char *s)
|
||||
{
|
||||
@@ -298,7 +296,7 @@ static int parse_fstab_line(char *line,
|
||||
parse_escape(freq);
|
||||
parse_escape(passno);
|
||||
|
||||
- dev = blkid_get_devname(cache, device, NULL);
|
||||
+ dev = fsck_get_devname(device);
|
||||
if (dev)
|
||||
device = dev;
|
||||
|
||||
@@ -323,7 +321,7 @@ static void interpret_type(struct fs_inf
|
||||
|
||||
if (strcmp(fs->type, "auto") != 0)
|
||||
return;
|
||||
- t = blkid_get_tag_value(cache, "TYPE", fs->device);
|
||||
+ t = fsck_get_fstype(fs->device);
|
||||
if (t) {
|
||||
free(fs->type);
|
||||
fs->type = t;
|
||||
@@ -1120,7 +1118,7 @@ static void PRS(int argc, char *argv[])
|
||||
progname);
|
||||
exit(EXIT_ERROR);
|
||||
}
|
||||
- dev = blkid_get_devname(cache, arg, NULL);
|
||||
+ dev = fsck_get_devname(arg);
|
||||
if (!dev && strchr(arg, '=')) {
|
||||
/*
|
||||
* Check to see if we failed because
|
||||
@@ -1266,7 +1264,7 @@ int main(int argc, char *argv[])
|
||||
bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
|
||||
textdomain(NLS_CAT_NAME);
|
||||
#endif
|
||||
- blkid_get_cache(&cache, NULL);
|
||||
+ fsck_get_cache(NULL);
|
||||
PRS(argc, argv);
|
||||
|
||||
if (!notitle)
|
||||
@@ -1337,6 +1335,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
status |= wait_many(FLAG_WAIT_ALL);
|
||||
free(fsck_path);
|
||||
- blkid_put_cache(cache);
|
||||
+ fsck_put_cache();
|
||||
return status;
|
||||
}
|
||||
Index: e2fsprogs-1.41.4/misc/fsck.h
|
||||
===================================================================
|
||||
--- e2fsprogs-1.41.4.orig/misc/fsck.h 2009-02-03 12:24:08.000000000 +0100
|
||||
+++ e2fsprogs-1.41.4/misc/fsck.h 2009-02-03 12:24:48.000000000 +0100
|
||||
@@ -66,6 +66,11 @@ struct fsck_instance {
|
||||
struct fsck_instance *next;
|
||||
};
|
||||
|
||||
+extern int fsck_get_cache(const char *filename);
|
||||
+extern void fsck_put_cache(void);
|
||||
+extern char *fsck_get_devname(const char *device);
|
||||
+extern char *fsck_get_fstype(const char *device);
|
||||
+
|
||||
extern dev_t base_devt(const char *device);
|
||||
extern int match_device(const char *dev1, const char *dev2);
|
||||
|
||||
Index: e2fsprogs-1.41.4/misc/fsck_volume_id.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ e2fsprogs-1.41.4/misc/fsck_volume_id.c 2009-02-03 12:24:48.000000000 +0100
|
||||
@@ -0,0 +1,132 @@
|
||||
+/*
|
||||
+ * Wrapper for libvolume_id
|
||||
+ */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <unistd.h>
|
||||
+#include <string.h>
|
||||
+#include <fcntl.h>
|
||||
+#include <sys/mount.h>
|
||||
+#include <sys/ioctl.h>
|
||||
+#include <stddef.h>
|
||||
+#include <libvolume_id.h>
|
||||
+
|
||||
+#include "fsck.h"
|
||||
+
|
||||
+int fsck_get_cache(const char *filename)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+void fsck_put_cache(void)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+static char *fsck_get_devname_by_uuid(const char *uuid)
|
||||
+{
|
||||
+ char *dev = NULL;
|
||||
+
|
||||
+ if (!uuid)
|
||||
+ return NULL;
|
||||
+
|
||||
+ dev = malloc(19 + strlen(uuid));
|
||||
+ if (dev) {
|
||||
+ strcpy(dev,"/dev/disk/by-uuid/");
|
||||
+ strcat(dev,uuid);
|
||||
+ }
|
||||
+
|
||||
+ return dev;
|
||||
+}
|
||||
+
|
||||
+static char *fsck_get_devname_by_label(const char *label)
|
||||
+{
|
||||
+ char *dev = NULL;
|
||||
+
|
||||
+ if (!label)
|
||||
+ return NULL;
|
||||
+
|
||||
+ dev = malloc(20 + strlen(label));
|
||||
+ if (dev) {
|
||||
+ strcpy(dev,"/dev/disk/by-label/");
|
||||
+ strcat(dev,label);
|
||||
+ }
|
||||
+
|
||||
+ return dev;
|
||||
+}
|
||||
+
|
||||
+char *fsck_get_devname(const char *spec)
|
||||
+{
|
||||
+ char *token, *cp, *value;
|
||||
+ char *nspec = NULL;
|
||||
+
|
||||
+ if (!spec)
|
||||
+ return NULL;
|
||||
+
|
||||
+ token = strdup(spec);
|
||||
+ if (!token)
|
||||
+ return NULL;
|
||||
+
|
||||
+ /* We have to return an allocated string */
|
||||
+ if (!(cp = strchr(token, '=')))
|
||||
+ return token;
|
||||
+
|
||||
+ value = token + (cp - token);
|
||||
+ *value++ = '\0';
|
||||
+
|
||||
+ if (*value == '"' || *value == '\'') {
|
||||
+ char c = *value++;
|
||||
+ if (!(cp = strrchr(value, c)))
|
||||
+ goto errout; /* missing closing quote */
|
||||
+ *cp = '\0';
|
||||
+ }
|
||||
+
|
||||
+ if (!strcmp(token,"LABEL")) {
|
||||
+ nspec = fsck_get_devname_by_label(value);
|
||||
+ } else if (!strcmp(token,"UUID")) {
|
||||
+ nspec = fsck_get_devname_by_uuid(value);
|
||||
+ }
|
||||
+
|
||||
+ free(token);
|
||||
+
|
||||
+ errout:
|
||||
+ return nspec;
|
||||
+}
|
||||
+
|
||||
+char *fsck_get_fstype(const char *device)
|
||||
+{
|
||||
+ int fd = -1;
|
||||
+ struct volume_id *vid = NULL;
|
||||
+ uint64_t size;
|
||||
+ const char *s;
|
||||
+ char *value = NULL;
|
||||
+
|
||||
+ if (!device)
|
||||
+ return NULL;
|
||||
+
|
||||
+ fd = open(device, O_RDONLY);
|
||||
+ if (fd < 0)
|
||||
+ return NULL;
|
||||
+
|
||||
+ vid = volume_id_open_fd(fd);
|
||||
+ if (!vid)
|
||||
+ goto out;
|
||||
+
|
||||
+ if (ioctl(fd, BLKGETSIZE64, &size) != 0)
|
||||
+ size = 0;
|
||||
+
|
||||
+ if (volume_id_probe_all(vid, 0, size) != 0)
|
||||
+ goto out;
|
||||
+
|
||||
+ if (!volume_id_get_type(vid, &s))
|
||||
+ goto out;
|
||||
+
|
||||
+ value = strdup(s);
|
||||
+out:
|
||||
+ if (vid != NULL)
|
||||
+ volume_id_close(vid);
|
||||
+ if (fd >= 0)
|
||||
+ close(fd);
|
||||
+
|
||||
+ return value;
|
||||
+}
|
@ -1,12 +0,0 @@
|
||||
--- lib/blkid/probe.c
|
||||
+++ lib/blkid/probe.c
|
||||
@@ -796,7 +796,8 @@
|
||||
*/
|
||||
try_again:
|
||||
type = 0;
|
||||
- if (!dev->bid_type || !strcmp(dev->bid_type, "mdraid")) {
|
||||
+ if ((!dev->bid_type || !strcmp(dev->bid_type, "mdraid")) &&
|
||||
+ getenv( "BLKID_SKIP_CHECK_MDRAID")==NULL ) {
|
||||
uuid_t uuid;
|
||||
|
||||
if (check_mdraid(probe.fd, uuid) == 0) {
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7c72de539b23710bd85095a7141fa909836fb9ef747e27cea18f7fb109bb127b
|
||||
size 46572
|
@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 29 05:46:03 CEST 2009 - kay.sievers@novell.com
|
||||
|
||||
- update to 1.41.7
|
||||
- disable libuuid and libblkid packages (moved to util-linux)
|
||||
- drop libvolume_id support (util-linux's libblkid will work)
|
||||
- removed patches:
|
||||
e2fsprogs-libvolume_id-support.patch
|
||||
e2fsprogs-no_cmd_hiding.patch
|
||||
e2fsprogs-base_devt.patch
|
||||
e2fsprogs-mdraid.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 9 19:39:24 CET 2009 - pth@suse.de
|
||||
|
||||
|
1031
e2fsprogs.spec
1031
e2fsprogs.spec
File diff suppressed because it is too large
Load Diff
@ -1,14 +0,0 @@
|
||||
## Path: Applications/uuidd
|
||||
## Description: Start uuidd on demand only
|
||||
## Type: yesno
|
||||
## Default: yes
|
||||
#
|
||||
# uuidd is normally started upon demand only by libuuid,
|
||||
# if possible. It is not necessary to start uuidd to create
|
||||
# UUIDs, it is only needed if you have the special requirement
|
||||
# of creating a large amount of time-based UUIDs.
|
||||
# It terminates then automatically when inactive after a
|
||||
# timeout of 5 minutes.
|
||||
# Set this to "no" if you want to run uuidd permanently.
|
||||
#
|
||||
UUIDD_ON_DEMAND_ONLY="yes"
|
90
uuidd.rc
90
uuidd.rc
@ -1,90 +0,0 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: uuidd
|
||||
# Required-Start: $time $local_fs $remote_fs
|
||||
# Should-Start:
|
||||
# Required-Stop: $time $local_fs $remote_fs
|
||||
# Should-Stop:
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: UUID generating daemon
|
||||
# Description: UUID generating daemon
|
||||
### END INIT INFO
|
||||
#
|
||||
|
||||
|
||||
UUIDD_BIN=/usr/sbin/uuidd
|
||||
UUIDD_PID_PATH=/var/run/uuidd
|
||||
UUIDD_OPTIONS="-q -T 0"
|
||||
|
||||
test -x $UUIDD_BIN || { echo "$UUIDD_BIN not installed";
|
||||
if [ "$1" = "stop" ]; then exit 0;
|
||||
else exit 5; fi; }
|
||||
|
||||
. /etc/rc.status
|
||||
. /etc/sysconfig/uuidd
|
||||
|
||||
# Reset status of this service
|
||||
rc_reset
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting uuidd "
|
||||
if ! test -d $UUIDD_PID_PATH; then
|
||||
mkdir -p $UUIDD_PID_PATH
|
||||
chown uuidd:uuidd $UUIDD_PID_PATH
|
||||
fi
|
||||
|
||||
if test "$UUIDD_ON_DEMAND_ONLY" = no; then
|
||||
/sbin/startproc $UUIDD_BIN $UUIDD_OPTIONS
|
||||
else
|
||||
echo -n "(on demand only)"
|
||||
rc_failed 6
|
||||
fi
|
||||
|
||||
rc_status -v
|
||||
;;
|
||||
stop)
|
||||
echo -n "Shutting down uuidd "
|
||||
/sbin/killproc -TERM $UUIDD_BIN
|
||||
|
||||
rc_status -v
|
||||
;;
|
||||
try-restart|condrestart|force-reload)
|
||||
## Do a restart only if the service was active before.
|
||||
## Note: try-restart is now part of LSB (as of 1.9).
|
||||
## RH has a similar command named condrestart.
|
||||
if test "$1" = "condrestart"; then
|
||||
echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
|
||||
fi
|
||||
$0 status
|
||||
if test $? = 0; then
|
||||
$0 restart
|
||||
else
|
||||
rc_reset # Not running is not a failure.
|
||||
fi
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
|
||||
rc_status
|
||||
;;
|
||||
reload)
|
||||
rc_failed 3
|
||||
rc_status -v
|
||||
;;
|
||||
status)
|
||||
echo -n "Checking for service uuidd "
|
||||
/sbin/checkproc $UUIDD_BIN
|
||||
|
||||
rc_status -v
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
rc_exit
|
Loading…
Reference in New Issue
Block a user