Skip to content

linux-drive: handle empty vendor/model/serial when building object pa… - #1528

Merged
tbzatek merged 1 commit into
storaged-project:masterfrom
qiuxinyidian:master
Aug 25, 2026
Merged

tbzatek merged 1 commit into
storaged-project:masterfrom
qiuxinyidian:master

Conversation

@qiuxinyidian

@qiuxinyidian qiuxinyidian commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

linux-drive: handle empty vendor/model/serial when building object path, Some NVMe devices expose empty Vendor/Model/Serial strings instead of NULL
fix:#1507

@qiuxinyidian

Copy link
Copy Markdown
Contributor Author

when check with udevadm info xxx , this nvme has no ID_SERIAL ID_MODEL ID_SERIAL_SHORT info

@qiuxinyidian

Copy link
Copy Markdown
Contributor Author
[root ]# udevadm info /dev/nvme0n1
P: /devices/pci0000:40/0000:40:03.1/0000:41:00.0/nvme/nvme0/nvme0n1
M: nvme0n1
R: 1
U: block
T: disk
D: b 259:0
N: nvme0n1
L: 0
S: disk/by-path/pci-0000:41:00.0-nvme-1
S: disk/by-id/nvme-uuid.e123f8b9-9d01-0000-3e50-56f434050000
S: disk/by-diskseq/117
Q: 117
E: DEVPATH=/devices/pci0000:40/0000:40:03.1/0000:41:00.0/nvme/nvme0/nvme0n1
E: DEVNAME=/dev/nvme0n1
E: DEVTYPE=disk
E: DISKSEQ=117
E: MAJOR=259
E: MINOR=0
E: SUBSYSTEM=block
E: USEC_INITIALIZED=55796653636
E: ID WWN=uuid.e123f8b9-9d01-0000-3e50-56f434050000
E: IDIREVISION=2.0.12
E: ID NSID=1
E: ID PATH=pci-0000:41:00.0-nvme-1
E: ID_PATH_TAG=pci-0000_41_00_0-nvme-1
E: MPATH_SBIN_PATH=/sbin
E: DM_MULTIPATH_DEVICE_PATH=0
E: UDISKS IGNORE=1
E: DEVLINKS=/dev/disk/by-path/pci-0000:41:00.0-nvme-1/dev/disk/by-id/nvmeuuid.e123f8b9-9d01-0000-3e50-56f434050000/dev/dis>
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:

@tbzatek tbzatek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, please just add one space before each opening parenthesis - see the common code style elsewhere.

Comment thread src/udiskslinuxdriveobject.c Outdated
…th, Some NVMe devices expose empty Vendor/Model/Serial strings instead of NULL.

Signed-off-by: lizhipeng <qiuxinyidian@gmail.com>
Co-authored-by: lizhipeng <lizhipeng@kylinos.cn>

@tbzatek tbzatek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@tbzatek

tbzatek commented Aug 22, 2026

Copy link
Copy Markdown
Member

Jenkins, ok to test.

1 similar comment
@qiuxinyidian

Copy link
Copy Markdown
Contributor Author

Jenkins, ok to test.

@tbzatek

tbzatek commented Aug 25, 2026

Copy link
Copy Markdown
Member

Jenkins, test this please.

@tbzatek
tbzatek merged commit e75c352 into storaged-project:master Aug 25, 2026
22 of 27 checks passed
@tbzatek tbzatek mentioned this pull request Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants