mirror of
https://github.com/systemd/systemd.git
synced 2024-12-25 01:34:28 +03:00
volume_id: run only once into a timeout for unreadable devices
This commit is contained in:
parent
5caa40bea2
commit
2bb4dd9766
@ -347,6 +347,10 @@ int volume_id_probe_raid(struct volume_id *id, uint64_t off, uint64_t size)
|
||||
if (id == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
/* run only once into a timeout for unreadable devices */
|
||||
if (volume_id_get_buffer(id, 0x00, 0x200) == NULL)
|
||||
return -1;
|
||||
|
||||
info("probing at offset 0x%llx, size 0x%llx",
|
||||
(unsigned long long) off, (unsigned long long) size);
|
||||
|
||||
@ -378,6 +382,10 @@ int volume_id_probe_filesystem(struct volume_id *id, uint64_t off, uint64_t size
|
||||
if (id == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
/* run only once into a timeout for unreadable devices */
|
||||
if (volume_id_get_buffer(id, 0x00, 0x200) == NULL)
|
||||
return -1;
|
||||
|
||||
info("probing at offset 0x%llx, size 0x%llx",
|
||||
(unsigned long long) off, (unsigned long long) size);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user