chiark / gitweb /
volume_id: remove all partition table support
authorKay Sievers <kay.sievers@suse.de>
Tue, 21 Mar 2006 15:16:55 +0000 (16:16 +0100)
committerKay Sievers <kay.sievers@suse.de>
Tue, 21 Mar 2006 15:16:55 +0000 (16:16 +0100)
extras/volume_id/README
extras/volume_id/libvolume_id/util.c
extras/volume_id/libvolume_id/util.h
extras/volume_id/libvolume_id/volume_id.c
extras/volume_id/libvolume_id/volume_id.h
extras/volume_id/vol_id.8

index 640a9e47ac4e121a070f246ed788797e3d224e5f..969f301a4cc53ffa1a9ee0a6cf2baa6a5adc4d74 100644 (file)
@@ -1,15 +1,15 @@
-vol_id - partition, filesystem, disklabel reader
+vol_id - volume, filesystem, disklabel reader
 
 This program is normally called from a udev rule, to provide udev with the
-name, uuid or the filesystem type of a partition to name a device node.
+name, uuid or the filesystem type of a volume to name a device node.
 vol_id opens the blockdevice node specified at the commandline.
 The following commandline switches are supported to specify what vol_id
 should print:
 
   --export prints all values
   -h       prints help text
-  -l       prints the label of the partition
-  -u       prints the uuid of the partition
+  -l       prints the label of the volume
+  -u       prints the uuid of the volume
 
 vol_id will only return successful if the string asked for, is not
 empty. All trailing whitespace will be removed, spaces replaced by underscore
index 361d7058d021e4c25978eff3850c9bdd983e0901..0ad8ce66b29d865fbe67e6d7a14c95c2a608f1eb 100644 (file)
@@ -68,8 +68,6 @@ static char *usage_to_string(enum volume_id_usage usage_id)
        switch (usage_id) {
        case VOLUME_ID_FILESYSTEM:
                return "filesystem";
-       case VOLUME_ID_PARTITIONTABLE:
-               return "partitiontable";
        case VOLUME_ID_OTHER:
                return "other";
        case VOLUME_ID_RAID:
@@ -86,12 +84,6 @@ static char *usage_to_string(enum volume_id_usage usage_id)
        return NULL;
 }
 
-void volume_id_set_usage_part(struct volume_id_partition *part, enum volume_id_usage usage_id)
-{
-       part->usage_id = usage_id;
-       part->usage = usage_to_string(usage_id);
-}
-
 void volume_id_set_usage(struct volume_id *id, enum volume_id_usage usage_id)
 {
        id->usage_id = usage_id;
index f6c57fb66dc18754290db7b182bec55aa05ee4d4..8cb1abd360046b896a7e5e285e24734119085c99 100644 (file)
@@ -64,7 +64,6 @@ enum endian {
 
 extern void volume_id_set_unicode16(char *str, size_t len, const uint8_t *buf, enum endian endianess, size_t count);
 extern void volume_id_set_usage(struct volume_id *id, enum volume_id_usage usage_id);
-extern void volume_id_set_usage_part(struct volume_id_partition *part, enum volume_id_usage usage_id);
 extern void volume_id_set_label_raw(struct volume_id *id, const uint8_t *buf, size_t count);
 extern void volume_id_set_label_string(struct volume_id *id, const uint8_t *buf, size_t count);
 extern void volume_id_set_label_unicode16(struct volume_id *id, const uint8_t *buf, enum endian endianess, size_t count);
index fdecf396c4abadd090dd4f0828d32153dbf660de..718d74e5b610b5e831988f5f6b59c4058293d9bd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * volume_id - reads filesystem label and uuid
+ * volume_id - reads volume label and uuid
  *
  * Copyright (C) 2005 Kay Sievers <kay.sievers@vrfy.org>
  *
@@ -221,8 +221,5 @@ void volume_id_close(struct volume_id *id)
 
        volume_id_free_buffer(id);
 
-       if (id->partitions != NULL)
-               free(id->partitions);
-
        free(id);
 }
index d370bae6c8f262dafbc0673062a14f58a3b75a6b..8ddffc96de5f82fa01b8d2ccdf094ce61277dbca 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * volume_id - reads partition label and uuid
+ * volume_id - reads volume label and uuid
  *
  * Copyright (C) 2005 Kay Sievers <kay.sievers@vrfy.org>
  *
@@ -31,21 +31,11 @@ enum volume_id_usage {
        VOLUME_ID_UNPROBED,
        VOLUME_ID_OTHER,
        VOLUME_ID_FILESYSTEM,
-       VOLUME_ID_PARTITIONTABLE,
        VOLUME_ID_RAID,
        VOLUME_ID_DISKLABEL,
        VOLUME_ID_CRYPTO,
 };
 
-struct volume_id_partition {
-       enum            volume_id_usage usage_id;
-       char            *usage;
-       char            *type;
-       uint64_t        off;
-       uint64_t        len;
-       uint8_t         partition_type_raw;
-};
-
 struct volume_id {
        uint8_t         label_raw[VOLUME_ID_LABEL_SIZE];
        size_t          label_raw_len;
@@ -58,9 +48,6 @@ struct volume_id {
        char            *type;
        char            type_version[VOLUME_ID_FORMAT_SIZE];
 
-       struct volume_id_partition *partitions;
-       size_t          partition_count;
-
        int             fd;
        uint8_t         *sbbuf;
        size_t          sbbuf_len;
index 6ffe7ce2206c53c0341f31c3787d17b34a87d55f..092911ad4c616251258d90a745070a51403eae43 100644 (file)
@@ -21,13 +21,13 @@ should print:
 print all values in key/value format to import them into the environment.
 .TP
 .BI -l
-print the label of the partition
+print the label of the volume
 .TP
 .BI -t
-print the type of the partition
+print the type of the volume
 .TP
 .BI -u
-print the uuid of the partition
+print the uuid of the volume
 .RE
 .SH EXIT STATUS
 .B vol_id