// SPDX-License-Identifier: GPL-2.0 /* * Routines that mimic syscalls, but don't use the user address space or file * descriptors. Only for init/ and related early init code.
*/ #include <linux/init.h> #include <linux/mount.h> #include <linux/namei.h> #include <linux/fs.h> #include <linux/fs_struct.h> #include <linux/file.h> #include <linux/init_syscalls.h> #include <linux/security.h> #include"internal.h"
int __init init_mount(constchar *dev_name, constchar *dir_name, constchar *type_page, unsignedlong flags, void *data_page)
{ struct path path; int ret;
ret = kern_path(dir_name, LOOKUP_FOLLOW, &path); if (ret) return ret;
ret = path_mount(dev_name, &path, type_page, flags, data_page);
path_put(&path); return ret;
}
int __init init_umount(constchar *name, int flags)
{ int lookup_flags = LOOKUP_MOUNTPOINT; struct path path; int ret;
if (!(flags & UMOUNT_NOFOLLOW))
lookup_flags |= LOOKUP_FOLLOW;
ret = kern_path(name, lookup_flags, &path); if (ret) return ret; return path_umount(&path, flags);
}
int __init init_chdir(constchar *filename)
{ struct path path; int error;
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.0Bemerkung:
(vorverarbeitet am 2026-06-06)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.