Skip to content

Commit 6ad4308

Browse files
committed
suppress missing attribute warnings
Attribute existence is dependent on kernel versions. Don't automatically warn if we fail to find the attribute, let the caller decide how to deal with it. Reported-by: Jeffrey Lien <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent 5727ac9 commit 6ad4308

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

nvme-topology.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,8 @@ char *nvme_get_ctrl_attr(char *path, const char *attr)
6060
goto err_free_path;
6161

6262
fd = open(attrpath, O_RDONLY);
63-
if (fd < 0) {
64-
fprintf(stderr, "Failed to open %s: %s\n",
65-
attrpath, strerror(errno));
63+
if (fd < 0)
6664
goto err_free_value;
67-
}
6865

6966
ret = read(fd, value, 1024);
7067
if (ret < 0) {

0 commit comments

Comments
 (0)