mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-25 06:03:40 +03:00
parent
7bbcaee307
commit
6be1feb1d7
@ -298,8 +298,11 @@ static int builtin_blkid(sd_device *dev, int argc, char *argv[], bool test) {
|
||||
return log_device_debug_errno(dev, r, "Failed to get device name: %m");
|
||||
|
||||
fd = open(devnode, O_RDONLY|O_CLOEXEC|O_NONBLOCK);
|
||||
if (fd < 0)
|
||||
return log_device_debug_errno(dev, errno, "Failed to open block device %s: %m", devnode);
|
||||
if (fd < 0) {
|
||||
log_device_debug_errno(dev, errno, "Failed to open block device %s%s: %m",
|
||||
devnode, errno == ENOENT ? ", ignoring" : "");
|
||||
return errno == ENOENT ? 0 : -errno;
|
||||
}
|
||||
|
||||
errno = 0;
|
||||
r = blkid_probe_set_device(pr, fd, offset, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user