github.com/freetocompute/snapd@v0.0.0-20210618182524-2fb355d72fd9/cmd/libsnap-confine-private/classic.h (about)

     1  /*
     2   * Copyright (C) 2015 Canonical Ltd
     3   *
     4   * This program is free software: you can redistribute it and/or modify
     5   * it under the terms of the GNU General Public License version 3 as
     6   * published by the Free Software Foundation.
     7   *
     8   * This program is distributed in the hope that it will be useful,
     9   * but WITHOUT ANY WARRANTY; without even the implied warranty of
    10   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    11   * GNU General Public License for more details.
    12   *
    13   * You should have received a copy of the GNU General Public License
    14   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    15   *
    16   */
    17  #ifndef SNAP_CONFINE_CLASSIC_H
    18  #define SNAP_CONFINE_CLASSIC_H
    19  
    20  #include <stdbool.h>
    21  
    22  // Location of the host filesystem directory in the core snap.
    23  #define SC_HOSTFS_DIR "/var/lib/snapd/hostfs"
    24  
    25  typedef enum sc_distro {
    26  	SC_DISTRO_CORE16,	// As present in both "core" and later on in "core16"
    27  	SC_DISTRO_CORE_OTHER,	// Any core distribution.
    28  	SC_DISTRO_CLASSIC,	// Any classic distribution.
    29  } sc_distro;
    30  
    31  sc_distro sc_classify_distro(void);
    32  
    33  // Returns true if it's a Debian-like distro as determined via /etc/os-release
    34  // and the "ID_LIKE" key in there.
    35  bool sc_is_debian_like(void);
    36  
    37  #endif