mount.c: make use of RVAL_DECODED
* mount.c (sys_mount): Update for RVAL_DECODED.
This commit is contained in:
parent
5935850c4d
commit
ef08ed1a03
85
mount.c
85
mount.c
@ -7,49 +7,48 @@
|
||||
|
||||
SYS_FUNC(mount)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
bool ignore_type = false;
|
||||
bool ignore_data = false;
|
||||
bool old_magic = false;
|
||||
unsigned long flags = tcp->u_arg[3];
|
||||
bool ignore_type = false;
|
||||
bool ignore_data = false;
|
||||
bool old_magic = false;
|
||||
unsigned long flags = tcp->u_arg[3];
|
||||
|
||||
/* Discard magic */
|
||||
if ((flags & MS_MGC_MSK) == MS_MGC_VAL) {
|
||||
flags &= ~MS_MGC_MSK;
|
||||
old_magic = true;
|
||||
}
|
||||
|
||||
if (flags & MS_REMOUNT)
|
||||
ignore_type = true;
|
||||
else if (flags & (MS_BIND | MS_MOVE | MS_SHARED
|
||||
| MS_PRIVATE | MS_SLAVE | MS_UNBINDABLE))
|
||||
ignore_type = ignore_data = true;
|
||||
|
||||
printpath(tcp, tcp->u_arg[0]);
|
||||
tprints(", ");
|
||||
|
||||
printpath(tcp, tcp->u_arg[1]);
|
||||
tprints(", ");
|
||||
|
||||
if (ignore_type)
|
||||
printaddr(tcp->u_arg[2]);
|
||||
else
|
||||
printstr(tcp, tcp->u_arg[2], -1);
|
||||
tprints(", ");
|
||||
|
||||
if (old_magic) {
|
||||
tprints("MS_MGC_VAL");
|
||||
if (flags)
|
||||
tprints("|");
|
||||
}
|
||||
if (flags || !old_magic)
|
||||
printflags(mount_flags, flags, "MS_???");
|
||||
tprints(", ");
|
||||
|
||||
if (ignore_data)
|
||||
printaddr(tcp->u_arg[4]);
|
||||
else
|
||||
printstr(tcp, tcp->u_arg[4], -1);
|
||||
/* Discard magic */
|
||||
if ((flags & MS_MGC_MSK) == MS_MGC_VAL) {
|
||||
flags &= ~MS_MGC_MSK;
|
||||
old_magic = true;
|
||||
}
|
||||
return 0;
|
||||
|
||||
if (flags & MS_REMOUNT)
|
||||
ignore_type = true;
|
||||
else if (flags & (MS_BIND | MS_MOVE | MS_SHARED
|
||||
| MS_PRIVATE | MS_SLAVE | MS_UNBINDABLE))
|
||||
ignore_type = ignore_data = true;
|
||||
|
||||
printpath(tcp, tcp->u_arg[0]);
|
||||
tprints(", ");
|
||||
|
||||
printpath(tcp, tcp->u_arg[1]);
|
||||
tprints(", ");
|
||||
|
||||
if (ignore_type)
|
||||
printaddr(tcp->u_arg[2]);
|
||||
else
|
||||
printstr(tcp, tcp->u_arg[2], -1);
|
||||
tprints(", ");
|
||||
|
||||
if (old_magic) {
|
||||
tprints("MS_MGC_VAL");
|
||||
if (flags)
|
||||
tprints("|");
|
||||
}
|
||||
if (flags || !old_magic)
|
||||
printflags(mount_flags, flags, "MS_???");
|
||||
tprints(", ");
|
||||
|
||||
if (ignore_data)
|
||||
printaddr(tcp->u_arg[4]);
|
||||
else
|
||||
printstr(tcp, tcp->u_arg[4], -1);
|
||||
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user