util.c: move printuid to uid.c

This will make further uid/gid fixes simpler.

* util.c (printuid): Move
* uid.c: ... here.
This commit is contained in:
Дмитрий Левин 2014-12-13 16:02:22 +00:00
parent c55bfb0045
commit 25ebe46ce2
2 changed files with 9 additions and 9 deletions

9
uid.c
View File

@ -75,3 +75,12 @@ sys_setresuid(struct tcb *tcp)
}
return 0;
}
void
printuid(const char *text, const unsigned int uid)
{
if ((unsigned int) -1 == uid)
tprintf("%s-1", text);
else
tprintf("%s%u", text, uid);
}

9
util.c
View File

@ -503,15 +503,6 @@ printfd(struct tcb *tcp, int fd)
tprintf("%d", fd);
}
void
printuid(const char *text, const unsigned int uid)
{
if ((unsigned int) -1 == uid)
tprintf("%s-1", text);
else
tprintf("%s%u", text, uid);
}
/*
* Quote string `instr' of length `size'
* Write up to (3 + `size' * 4) bytes to `outstr' buffer.