Whamcloud - gitweb
Remove bid_id from the blkid device structure, as it is not used
authorTheodore Ts'o <tytso@mit.edu>
Fri, 14 Feb 2003 06:40:23 +0000 (01:40 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 14 Feb 2003 06:40:23 +0000 (01:40 -0500)
for anything.

lib/blkid/ChangeLog
lib/blkid/blkidP.h
lib/blkid/devname.c
lib/blkid/read.c
lib/blkid/save.c

index 79bdb2a..cc10bdd 100644 (file)
@@ -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.
index 423e7de..67a472b 100644 (file)
@@ -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) {
index ef001d1..acc9b07 100644 (file)
@@ -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;
        }
index ce52d83..06de451 100644 (file)
@@ -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);
index 5de0719..6f1d244 100644 (file)
@@ -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) {