Skip to content

Commit

Permalink
Merge branch 'main' of ../pcp
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcdonell committed Feb 21, 2024
2 parents 8863741 + 5a70e1c commit e51af7e
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions src/pmdas/linux/filesys.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,15 @@ do_uuids(pmInDom filesys_indom)
pmsprintf(path, sizeof(path), "%s/dev/disk/by-uuid", linux_statspath);

if (stat(path, &sbuf) < 0) {
if (!seen_err) {
fprintf(stderr, "do_uuids: stat(%s) failed: %s\n", path, pmErrStr(-oserror()));
seen_err = 1;
/*
* containers, esp in GitHub CI don't even have this directory,
* so silently move on ...
*/
if (pmDebugOptions.libpmda) {
if (!seen_err) {
fprintf(stderr, "do_uuids: stat(%s) failed: %s\n", path, pmErrStr(-oserror()));
seen_err = 1;
}
}
return;
}
Expand All @@ -76,9 +82,12 @@ do_uuids(pmInDom filesys_indom)
mtim.tv_nsec = sbuf.st_mtim.tv_nsec;

if ((dp = opendir(path)) == NULL) {
if (!seen_err) {
fprintf(stderr, "do_uuids: opendir(%s) failed: %s\n", path, pmErrStr(-oserror()));
seen_err = 1;
/* don't expect to get here, but report if -Dlibpmda */
if (pmDebugOptions.libpmda) {
if (!seen_err) {
fprintf(stderr, "do_uuids: opendir(%s) failed: %s\n", path, pmErrStr(-oserror()));
seen_err = 1;
}
}
return;
}
Expand Down

0 comments on commit e51af7e

Please sign in to comment.