mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
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>
This commit is contained in:
@@ -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 {
|
||||
@@ -949,7 +949,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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user