print_struct_flock64(const struct_kernel_flock64 *fl, const int getlk)
{
tprints("{l_type=");
- printxval(lockfcmds, fl->l_type, "F_???");
+ printxval(lockfcmds, (unsigned short) fl->l_type, "F_???");
tprints(", l_whence=");
- printxval(whence_codes, fl->l_whence, "SEEK_???");
+ printxval(whence_codes, (unsigned short) fl->l_whence, "SEEK_???");
tprintf(", l_start=%lld, l_len=%lld",
(long long) fl->l_start, (long long) fl->l_len);
if (getlk)
static int
print_fcntl(struct tcb *tcp)
{
- switch (tcp->u_arg[1]) {
+ const unsigned int cmd = tcp->u_arg[1];
+
+ switch (cmd) {
case F_SETFD:
tprints(", ");
printflags(fdflags, tcp->u_arg[2], "FD_???");
break;
case F_NOTIFY:
tprints(", ");
- printflags(notifyflags, tcp->u_arg[2], "DN_???");
+ printflags_long(notifyflags, tcp->u_arg[2], "DN_???");
break;
case F_SETLEASE:
tprints(", ");
- printxval(lockfcmds, tcp->u_arg[2], "F_???");
+ printxval_long(lockfcmds, tcp->u_arg[2], "F_???");
break;
case F_ADD_SEALS:
tprints(", ");
- printflags(f_seals, tcp->u_arg[2], "F_SEAL_???");
+ printflags_long(f_seals, tcp->u_arg[2], "F_SEAL_???");
break;
case F_SETSIG:
tprints(", ");
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
tprints(", ");
- const char *str =
- xlookup(fcntlcmds, (unsigned long) tcp->u_arg[1]);
+ const unsigned int cmd = tcp->u_arg[1];
+ const char *str = xlookup(fcntlcmds, cmd);
if (str) {
tprints(str);
} else {
* constants, but we would like to show them
* for better debugging experience.
*/
- printxval(fcntl64cmds, tcp->u_arg[1], "F_???");
+ printxval(fcntl64cmds, cmd, "F_???");
}
}
return print_fcntl(tcp);
SYS_FUNC(fcntl64)
{
+ const unsigned int cmd = tcp->u_arg[1];
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
tprints(", ");
- const char *str =
- xlookup(fcntl64cmds, (unsigned long) tcp->u_arg[1]);
+ const char *str = xlookup(fcntl64cmds, cmd);
if (str) {
tprints(str);
} else {
- printxval(fcntlcmds, tcp->u_arg[1], "F_???");
+ printxval(fcntlcmds, cmd, "F_???");
}
}
- switch (tcp->u_arg[1]) {
+ switch (cmd) {
case F_SETLK64:
case F_SETLKW64:
tprints(", ");