ostree-prepare-root: enabler for simpler kernel arg
authorGatis Paeglis <gatis.paeglis@qt.io>
Fri, 12 Aug 2016 06:50:29 +0000 (08:50 +0200)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 10 Jan 2018 13:52:58 +0000 (13:52 +0000)
commit62cb078973f2dacd0975a7d67da907d267dbd8bd
tree94967f6111f12f70911069112e00ba25c025e1c8
parent94bbbdf3ca37507197b8db62271b69b9fd1374e4
ostree-prepare-root: enabler for simpler kernel arg

With the current approach, when ostree-prepare-root is used
on the kernel command line as init=, it always assumes that
the next value in the argument list is a path to the sysroot.
The code for falling back to a default path (if none is provided),
would only work if init= is the last arg in the argument list.
We can not rely on that and have to explicitly provide the
path to the sysroot. Which defeats the purpose of a default
path selection code.

To keep command line neater assume that sysroot is on / when
using ostree-prepare-root as init. This probably is what most
people want anyways. Also _ostree_kernel_args* API assumes
that args are space separated list. Which is problematic for:
"init=${ostree}/usr/lib/ostree/ostree-prepare-root /" as it
gets split in two.

Closes: #1401
Approved by: cgwalters
src/switchroot/ostree-prepare-root.c