From: Andrew Deason Date: Mon, 7 Jun 2010 16:42:02 +0000 (-0500) Subject: AIX: make osi_procname a stub X-Git-Tag: openafs-devel-1_5_75~178 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=eee8bc9cf9fa53488abd973249b8b61bc3f61956;p=packages%2Fo%2Fopenafs.git AIX: make osi_procname a stub 'curproc', 'curthread', or other such conveniences do not exist on AIX, so the current osi_procname implementation breaks the build. Determining the current process name on AIX is, while possible, difficult and error-prone. Since we only need the process name for informational messages to users, don't bother trying to determine it, and just return the empty string so we can build. Change-Id: I452a9786d809c3dee3da519cd3d6ca053f8d7ab8 Reviewed-on: http://gerrit.openafs.org/2094 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/afs/AIX/osi_machdep.h b/src/afs/AIX/osi_machdep.h index 878bca679..f35e97936 100644 --- a/src/afs/AIX/osi_machdep.h +++ b/src/afs/AIX/osi_machdep.h @@ -80,6 +80,10 @@ extern simple_lock_data afs_global_lock; mutex_init(&afs_global_lock, "afs_global_lock", MUTEX_DEFAULT, NULL) #endif -#define osi_procname(procname, size) strncpy(procname, curproc->pi_comm, size) +/* Reading the current proc name from kernelspace is difficult. It is + * probably possible via indexing into v.vb_proc, but for now don't bother. + * To actually obtain the proc name, look at afs_procsize_init and + * src/afs/AIX/osi_gcpags.c for how to look at the process list */ +#define osi_procname(procname, size) strncpy(procname, "", size) #endif /* _OSI_MACHDEP_H_ */