]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/sysfs: add TODO about removable usb devices
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 11 Jan 2023 18:17:35 +0000 (18:17 +0000)
committerKarel Zak <kzak@redhat.com>
Tue, 24 Jan 2023 16:26:15 +0000 (17:26 +0100)
The usage of the "removable" attribute by the USB subsystem is
incorrect.

lib/sysfs.c

index f3253595607305ffde16abc6c1c7c606ae224296..838b9af140f5926c14ad08ec347bd31b5aa10f3d 100644 (file)
@@ -487,6 +487,8 @@ int sysfs_blkdev_is_removable(struct path_cxt *pc)
 {
        int rc = 0;
 
+       // FIXME usb is not actually removable
+
        /* check /sys/dev/block/<maj>:<min>/removable attribute */
        if (ul_path_read_s32(pc, &rc, "removable") == 0)
                return rc;