diff --git a/src/nodeinfo.c b/src/nodeinfo.c index 415c2e5f6cda47137b2e3e4c65013716b8d9fd3b..72ab39442332e0ce422aee31c2d933a15086d790 100644 --- a/src/nodeinfo.c +++ b/src/nodeinfo.c @@ -168,6 +168,12 @@ virNodeCountThreadSiblings(const char *dir, unsigned int cpu) pathfp = fopen(path, "r"); if (pathfp == NULL) { + /* If file doesn't exist, then pretend our only + * sibling is ourself */ + if (errno == ENOENT) { + VIR_FREE(path); + return 1; + } virReportSystemError(errno, _("cannot open %s"), path); VIR_FREE(path); return 0;