rootfs: switch createDevices argument order

This argument order matches most other helpers we have and will also
match the changes we are about to make to setupPtmx and
setupDevSymlinks.

Signed-off-by: Aleksa Sarai <aleksa@amutable.com>
(cherry picked from commit fcf04eb41b)
Signed-off-by: Aleksa Sarai <aleksa@amutable.com>
This commit is contained in:
Aleksa Sarai
2026-04-15 01:12:31 +10:00
parent 6a7de4eb8b
commit 5f2f6b56df
+2 -2
View File
@@ -184,7 +184,7 @@ func prepareRootfs(pipe *syncSocket, iConfig *initConfig) (err error) {
setupDev := needsSetupDev(config)
if setupDev {
if err := createDevices(config, rootFd); err != nil {
if err := createDevices(rootFd, config); err != nil {
return fmt.Errorf("error creating device nodes: %w", err)
}
if err := setupPtmx(config); err != nil {
@@ -959,7 +959,7 @@ func reOpenDevNull() error {
}
// Create the device nodes in the container.
func createDevices(config *configs.Config, rootFd *os.File) error {
func createDevices(rootFd *os.File, config *configs.Config) error {
useBindMount := userns.RunningInUserNS() || config.Namespaces.Contains(configs.NEWUSER)
for _, node := range config.Devices {