]> git.ipfire.org Git - thirdparty/lxc.git/commit
Check only rootfs as filesystem type 3529/head
authorPranay Kr. Srivastava <pranay.srivastava@pantacor.com>
Mon, 24 Aug 2020 08:10:02 +0000 (13:40 +0530)
committerPranay Kr. Srivastava <pranay.srivastava@pantacor.com>
Mon, 24 Aug 2020 08:10:15 +0000 (13:40 +0530)
commit97edebfacd8be1163a1ad285ddcfcf843f1a46de
treefb6dff881dd1bddb594d31e70982aff3f827bc8a
parentc22a1a4a52eed5f0f1e84f9e816570bf87b90ef6
Check only rootfs as filesystem type

When detecting if rootfs is on ramfs instead of checking "- rootfs
rootfs" which is the " - <file_system> <device>" information only check
the file system type. This is due to a change introduced in kernel where
ramfs file system doesn't set the device to "rootfs" but instead mark it
as "none". By making sure we only check for "rootfs" as the file system
name we also offer backward compatibility with earlier kernels as well.

The kernel commit that introduced this change was

commit f32356261d44d580649a7abce1156d15d49cf20f
Author: David Howells <dhowells@redhat.com>
Date:   Mon Mar 25 16:38:31 2019 +0000

    vfs: Convert ramfs, shmem, tmpfs, devtmpfs, rootfs to use the new
    mount API

Signed-off-by: Pranay Kr. Srivastava <pranay.srivastava@pantacor.com>
src/lxc/utils.c