]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: topology: allow setting of 64bit values
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 28 Dec 2022 01:45:46 +0000 (01:45 +0000)
committerThomas Weißschuh <thomas@t-8ch.de>
Wed, 28 Dec 2022 12:34:20 +0000 (12:34 +0000)
libblkid/src/topology/topology.c

index 53007d1b8a6609b9f545b95d9ade6e80ab9cb924..d638c4c203fb1400e4d8121ceb3150198977f1a9 100644 (file)
@@ -207,7 +207,7 @@ static void topology_free(blkid_probe pr __attribute__((__unused__)),
 }
 
 static int topology_set_value(blkid_probe pr, const char *name,
-                               size_t structoff, unsigned long data)
+                               size_t structoff, unsigned long long data)
 {
        struct blkid_chain *chn = blkid_probe_get_chain(pr);
 
@@ -220,7 +220,7 @@ static int topology_set_value(blkid_probe pr, const char *name,
                memcpy((char *) chn->data + structoff, &data, sizeof(data));
                return 0;
        }
-       return blkid_probe_sprintf_value(pr, name, "%lu", data);
+       return blkid_probe_sprintf_value(pr, name, "%llu", data);
 }