btrfs-progs: don't have to report ENOMEDIUM error during open

when we scan /proc/partitions the cdrom is scanned
as well, and we don't have to report ENOMEDIUM errors
against it.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
master
Anand Jain 2013-07-26 01:35:30 +08:00 committed by David Sterba
parent a2fc3b5113
commit 1c1725a07b
1 changed files with 3 additions and 2 deletions

View File

@ -1438,8 +1438,9 @@ scan_again:
fd = open(fullpath, O_RDONLY);
if (fd < 0) {
fprintf(stderr, "failed to open %s: %s\n",
fullpath, strerror(errno));
if (errno != ENOMEDIUM)
fprintf(stderr, "failed to open %s: %s\n",
fullpath, strerror(errno));
continue;
}
ret = btrfs_scan_one_device(fd, fullpath, &tmp_devices,