]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
common/blkdev: remove double _'s from device_id
authorSage Weil <sage@newdream.net>
Thu, 20 May 2021 20:12:11 +0000 (15:12 -0500)
committerSage Weil <sage@newdream.net>
Thu, 20 May 2021 20:12:11 +0000 (15:12 -0500)
commit5ee787944b0d00ce3bb6766f5b176e971eff91f9
tree598db645eda63a4d13f69fe0f3a51d1849e18381
parentd29f7d2f71d8267fa9f6c7280a711f33dcc01099
common/blkdev: remove double _'s from device_id

For some unknown reason some devices have double spaces in their
ID_MODEL_ENC string from udev:

cpach:build (devid-underscores) 03:10 PM $ udevadm  info /dev/sdt | grep ID_MODEL_ENC
E: ID_MODEL_ENC=WDC\x20\x20WDS400T2B0A-00SM50\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
cpach:build (devid-underscores) 03:10 PM $ udevadm  info /dev/sdn | grep ID_MODEL_ENC
E: ID_MODEL_ENC=WDC\x20WDS200T2B0A-00SM50\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20

It's not clear why this only happens on some devices and not others,
especially when they are the same model of device.  Regardless, removing
the duplicate ' '/'_' is straightforward.

Signed-off-by: Sage Weil <sage@newdream.net>
src/common/blkdev.cc
src/test/common/test_blkdev.cc