File: chxml2xmlmock.c

package info (click to toggle)
libvirt 11.3.0-3%2Bdeb13u2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 203,868 kB
  • sloc: ansic: 531,629; xml: 289,702; python: 11,881; perl: 2,629; sh: 2,172; makefile: 447; javascript: 126; cpp: 22
file content (20 lines) | stat: -rw-r--r-- 361 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * Copyright (C) 2024 Red Hat, Inc.
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

#include <config.h>
#include <unistd.h>

#include "internal.h"
#include "virfile.h"

bool
virFileExists(const char *path)
{
    if (STREQ(path, "/dev/kvm"))
        return true;
    if (STREQ(path, "/dev/mshv"))
        return true;
    return access(path, F_OK) == 0;
}