expand_name:

use pid_t and uid_t in the declaration as that is what we are passed
	fix printf formatters accordingly.

Reviewed by:	green
This commit is contained in:
Bill Fumerola 1999-08-16 18:13:39 +00:00
parent 48f6456d82
commit 87f1de5f58
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=49899
2 changed files with 7 additions and 7 deletions

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_sig.c 8.7 (Berkeley) 4/18/94
* $Id: kern_sig.c,v 1.58 1999/07/18 13:40:11 peter Exp $
* $Id: kern_sig.c,v 1.59 1999/08/14 19:58:58 alfred Exp $
*/
#include "opt_compat.h"
@ -1288,7 +1288,7 @@ SYSCTL_STRING(_kern, OID_AUTO, corefile, CTLFLAG_RW, corefilename,
char *
expand_name(name, uid, pid)
const char *name; int uid; int pid; {
const char *name; uid_t uid; pid_t pid; {
char *temp;
char buf[11]; /* Buffer for pid/uid -- max 4B */
int i, n;
@ -1310,7 +1310,7 @@ const char *name; int uid; int pid; {
break;
case 'N': /* process name */
if ((n + namelen) > MAXPATHLEN) {
log(LOG_ERR, "pid %d (%s), uid (%d): Path `%s%s' is too long\n",
log(LOG_ERR, "pid %d (%s), uid (%u): Path `%s%s' is too long\n",
pid, name, uid, temp, name);
free(temp, M_TEMP);
return NULL;
@ -1321,7 +1321,7 @@ const char *name; int uid; int pid; {
case 'P': /* process id */
l = sprintf(buf, "%u", pid);
if ((n + l) > MAXPATHLEN) {
log(LOG_ERR, "pid %d (%s), uid (%d): Path `%s%s' is too long\n",
log(LOG_ERR, "pid %d (%s), uid (%u): Path `%s%s' is too long\n",
pid, name, uid, temp, name);
free(temp, M_TEMP);
return NULL;
@ -1332,7 +1332,7 @@ const char *name; int uid; int pid; {
case 'U': /* user id */
l = sprintf(buf, "%u", uid);
if ((n + l) > MAXPATHLEN) {
log(LOG_ERR, "pid %d (%s), uid (%d): Path `%s%s' is too long\n",
log(LOG_ERR, "pid %d (%s), uid (%u): Path `%s%s' is too long\n",
pid, name, uid, temp, name);
free(temp, M_TEMP);
return NULL;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)signalvar.h 8.6 (Berkeley) 2/19/95
* $Id: signalvar.h,v 1.23 1999/01/26 02:38:11 julian Exp $
* $Id: signalvar.h,v 1.24 1999/07/06 07:13:48 cracauer Exp $
*/
#ifndef _SYS_SIGNALVAR_H_ /* tmp for user.h */
@ -158,7 +158,7 @@ extern int sugid_coredump; /* Sysctl variable kern.sugid_coredump */
* Machine-independent functions:
*/
void execsigs __P((struct proc *p));
char *expand_name __P((const char*, int, int));
char *expand_name __P((const char*, uid_t, pid_t));
void gsignal __P((int pgid, int sig));
int issignal __P((struct proc *p));
void killproc __P((struct proc *p, char *why));