- r = command (NULL, NULL, "mount", "--bind", "/dev", "/sysroot/dev", NULL);
+ sysroot_dev = sysroot_path ("/dev");
+ sysroot_dev_pts = sysroot_path ("/dev/pts");
+ sysroot_proc = sysroot_path ("/proc");
+ sysroot_selinux = sysroot_path ("/selinux");
+ sysroot_sys = sysroot_path ("/sys");
+
+ if (sysroot_dev == NULL || sysroot_dev_pts == NULL ||
+ sysroot_proc == NULL || sysroot_selinux == NULL ||
+ sysroot_sys == NULL) {
+ reply_with_perror ("malloc");
+ free (sysroot_dev);
+ free (sysroot_dev_pts);
+ free (sysroot_proc);
+ free (sysroot_selinux);
+ free (sysroot_sys);
+ return NULL;
+ }
+
+ r = command (NULL, NULL, "mount", "--bind", "/dev", sysroot_dev, NULL);