]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udevadm: output trigger UUID in UUID format, instead of ID128
authorLennart Poettering <lennart@poettering.net>
Mon, 31 May 2021 20:56:02 +0000 (22:56 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 1 Jun 2021 02:14:03 +0000 (11:14 +0900)
The SYNTH_UUID property also shows it in UUID format, and so does the
kernel and its docs otherwise, hence accept our fate and also output it
in UUID.

src/udev/udevadm-trigger.c

index c75445959e666128808a438d438fe205e8a17e73..dc68f38d03319b0ea96c35831a09d6f58feaad81 100644 (file)
@@ -109,7 +109,7 @@ static int exec_list(
 
                 /* If the user asked for it, write event UUID to stdout */
                 if (arg_uuid)
-                        printf(SD_ID128_FORMAT_STR "\n", SD_ID128_FORMAT_VAL(id));
+                        printf(SD_ID128_UUID_FORMAT_STR "\n", SD_ID128_FORMAT_VAL(id));
 
                 if (settle_hashmap) {
                         _cleanup_free_ sd_id128_t *mid = NULL;
@@ -175,7 +175,7 @@ static int device_monitor_handler(sd_device_monitor *m, sd_device *dev, void *us
                 printf("settle %s\n", syspath);
 
         if (arg_uuid)
-                printf("settle " SD_ID128_FORMAT_STR "\n", SD_ID128_FORMAT_VAL(*settle_id));
+                printf("settle " SD_ID128_UUID_FORMAT_STR "\n", SD_ID128_FORMAT_VAL(*settle_id));
 
         free(hashmap_remove(settle_hashmap, syspath));
         free(k);