+#define NEED_ROOT \
+ do { \
+ if (!root_mounted) { \
+ reply_with_error ("%s: you must call 'mount' first to mount the root filesystem", __func__); \
+ return -1; \
+ } \
+ } \
+ while (0)
+
+/* NB:
+ * (1) You must match CHROOT_IN and CHROOT_OUT even along error paths.
+ * (2) You must not change directory! cwd must always be "/", otherwise
+ * we can't escape our own chroot.
+ * (3) All paths specified must be absolute.
+ */
+#define CHROOT_IN chroot ("/sysroot");
+#define CHROOT_OUT chroot (".");
+