diff options
author | Theodore Ts'o <tytso@mit.edu> | 2003-02-14 01:40:23 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2003-02-14 01:40:23 -0500 |
commit | bc40efd3d0b0c06437eade1a42a14c858c66151e (patch) | |
tree | 5c4f57ee88c12bbd26fe4056b438bd5e3a8df944 | |
parent | ce72b862c59da24ba16b354d687549276a24f908 (diff) | |
download | e2fsprogs-bc40efd3d0b0c06437eade1a42a14c858c66151e.tar.gz |
Remove bid_id from the blkid device structure, as it is not used
for anything.
-rw-r--r-- | lib/blkid/ChangeLog | 4 | ||||
-rw-r--r-- | lib/blkid/blkidP.h | 4 | ||||
-rw-r--r-- | lib/blkid/devname.c | 1 | ||||
-rw-r--r-- | lib/blkid/read.c | 6 | ||||
-rw-r--r-- | lib/blkid/save.c | 5 |
5 files changed, 7 insertions, 13 deletions
diff --git a/lib/blkid/ChangeLog b/lib/blkid/ChangeLog index 79bdb2a3..cc10bddf 100644 --- a/lib/blkid/ChangeLog +++ b/lib/blkid/ChangeLog @@ -1,5 +1,9 @@ 2003-02-14 Theodore Ts'o <tytso@mit.edu> + * blkidP.h, devname.c (blkid_get_devname), read.c (parse_tag), + save.c (save_dev): Remove bid_id, as it is not used for + anything. + * Makefile.in (blkid): When building the blkid, don't link against the shared blkid library; link only against the static blkid library. diff --git a/lib/blkid/blkidP.h b/lib/blkid/blkidP.h index 423e7dea..67a472be 100644 --- a/lib/blkid/blkidP.h +++ b/lib/blkid/blkidP.h @@ -36,7 +36,6 @@ struct blkid_struct_dev int bid_pri; /* Device priority */ dev_t bid_devno; /* Device major/minor number */ time_t bid_time; /* Last update time of device */ - unsigned int bid_id; /* Unique cache id for device */ unsigned int bid_flags; /* Device status bitflags */ char *bid_label; /* Shortcut to device LABEL */ char *bid_uuid; /* Shortcut to binary UUID */ @@ -88,7 +87,6 @@ struct blkid_struct_cache struct list_head bic_devs; /* List head of all devices */ struct list_head bic_tags; /* List head of all tag types */ time_t bic_time; /* Last probe time */ -p unsigned int bic_idmax; /* Highest ID assigned */ unsigned int bic_flags; /* Status flags of the cache */ char *bic_filename; /* filename of cache */ }; @@ -162,7 +160,6 @@ static inline void DEB_DUMP_DEV(blkid_dev dev) printf(" dev: name = %s\n", dev->bid_name); printf(" dev: DEVNO=\"0x%0Lx\"\n", dev->bid_devno); - printf(" dev: ID=\"%u\"\n", dev->bid_id); printf(" dev: TIME=\"%lu\"\n", dev->bid_time); printf(" dev: PRI=\"%d\"\n", dev->bid_pri); printf(" dev: flags = 0x%08X\n", dev->bid_flags); @@ -184,7 +181,6 @@ static inline void DEB_DUMP_CACHE(blkid_cache cache) } printf("cache: time = %lu\n", cache->bic_time); - printf("cache: idmax = %u\n", cache->bic_idmax); printf("cache: flags = 0x%08X\n", cache->bic_flags); list_for_each(p, &cache->bic_devs) { diff --git a/lib/blkid/devname.c b/lib/blkid/devname.c index ef001d13..acc9b078 100644 --- a/lib/blkid/devname.c +++ b/lib/blkid/devname.c @@ -73,7 +73,6 @@ blkid_dev blkid_get_devname(blkid_cache cache, const char *devname, return NULL; dev->bid_name = blkid_strdup(devname); dev->bid_cache = cache; - dev->bid_id = ++(cache->bic_idmax); list_add_tail(&dev->bid_devs, &cache->bic_devs); cache->bic_flags |= BLKID_BIC_FL_CHANGED; } diff --git a/lib/blkid/read.c b/lib/blkid/read.c index ce52d832..06de4516 100644 --- a/lib/blkid/read.c +++ b/lib/blkid/read.c @@ -307,11 +307,7 @@ static int parse_tag(blkid_cache cache, blkid_dev dev, char **cp) return ret; /* Some tags are stored directly in the device struct */ - if (!strcmp(name, "ID")) { - dev->bid_id = (unsigned int)strtoul(value, 0, 0); - if (dev->bid_id > cache->bic_idmax) - cache->bic_idmax = dev->bid_id; - } else if (!strcmp(name, "DEVNO")) + if (!strcmp(name, "DEVNO")) dev->bid_devno = STRTOULL(value, 0, 0); else if (!strcmp(name, "PRI")) dev->bid_pri = strtol(value, 0, 0); diff --git a/lib/blkid/save.c b/lib/blkid/save.c index 5de07190..6f1d2447 100644 --- a/lib/blkid/save.c +++ b/lib/blkid/save.c @@ -42,9 +42,8 @@ static int save_dev(blkid_dev dev, FILE *file) DBG(printf("device %s, type %s\n", dev->bid_name, dev->bid_type)); fprintf(file, - "<device TYPE=\"%s\" DEVNO=\"0x%04lx\" ID=\"%d\" TIME=\"%lu\"", - dev->bid_type, (unsigned long) dev->bid_devno, - dev->bid_id, dev->bid_time); + "<device TYPE=\"%s\" DEVNO=\"0x%04lx\" TIME=\"%lu\"", + dev->bid_type, (unsigned long) dev->bid_devno, dev->bid_time); if (dev->bid_pri) fprintf(file, " PRI=\"%d\"", dev->bid_pri); list_for_each(p, &dev->bid_tags) { |