mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2025-01-26 23:04:42 +00:00
*** empty log message ***
This commit is contained in:
parent
2b8f817cfb
commit
3a511f5874
1 changed files with 6 additions and 2 deletions
|
@ -699,7 +699,6 @@ getloadavg (loadavg, nelem)
|
||||||
/* Get the address of LDAV_SYMBOL. */
|
/* Get the address of LDAV_SYMBOL. */
|
||||||
if (offset == 0)
|
if (offset == 0)
|
||||||
{
|
{
|
||||||
#ifndef SUNOS_5
|
|
||||||
#ifndef sgi
|
#ifndef sgi
|
||||||
#ifndef NLIST_STRUCT
|
#ifndef NLIST_STRUCT
|
||||||
strcpy (nl[0].n_name, LDAV_SYMBOL);
|
strcpy (nl[0].n_name, LDAV_SYMBOL);
|
||||||
|
@ -714,6 +713,7 @@ getloadavg (loadavg, nelem)
|
||||||
#endif /* not NLIST_NAME_UNION */
|
#endif /* not NLIST_NAME_UNION */
|
||||||
#endif /* NLIST_STRUCT */
|
#endif /* NLIST_STRUCT */
|
||||||
|
|
||||||
|
#ifndef SUNOS_5
|
||||||
if (nlist (KERNEL_FILE, nl) >= 0)
|
if (nlist (KERNEL_FILE, nl) >= 0)
|
||||||
/* Omit "&& nl[0].n_type != 0 " -- it breaks on Sun386i. */
|
/* Omit "&& nl[0].n_type != 0 " -- it breaks on Sun386i. */
|
||||||
{
|
{
|
||||||
|
@ -722,6 +722,7 @@ getloadavg (loadavg, nelem)
|
||||||
#endif
|
#endif
|
||||||
offset = nl[0].n_value;
|
offset = nl[0].n_value;
|
||||||
}
|
}
|
||||||
|
#endif /* !SUNOS_5 */
|
||||||
#else /* sgi */
|
#else /* sgi */
|
||||||
int ldav_off;
|
int ldav_off;
|
||||||
|
|
||||||
|
@ -729,7 +730,6 @@ getloadavg (loadavg, nelem)
|
||||||
if (ldav_off != -1)
|
if (ldav_off != -1)
|
||||||
offset = (long) ldav_off & 0x7fffffff;
|
offset = (long) ldav_off & 0x7fffffff;
|
||||||
#endif /* sgi */
|
#endif /* sgi */
|
||||||
#endif /* !SUNOS_5 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure we have /dev/kmem open. */
|
/* Make sure we have /dev/kmem open. */
|
||||||
|
@ -740,10 +740,14 @@ getloadavg (loadavg, nelem)
|
||||||
if (channel >= 0)
|
if (channel >= 0)
|
||||||
getloadavg_initialized = 1;
|
getloadavg_initialized = 1;
|
||||||
#else /* SUNOS_5 */
|
#else /* SUNOS_5 */
|
||||||
|
/* We pass 0 for the kernel, corefile, and swapfile names
|
||||||
|
to use the currently running kernel. */
|
||||||
kd = kvm_open (0, 0, 0, O_RDONLY, 0);
|
kd = kvm_open (0, 0, 0, O_RDONLY, 0);
|
||||||
if (kd != 0)
|
if (kd != 0)
|
||||||
{
|
{
|
||||||
|
/* nlist the currently running kernel. */
|
||||||
kvm_nlist (kd, nl);
|
kvm_nlist (kd, nl);
|
||||||
|
offset = nl[0].n_value;
|
||||||
getloadavg_initialized = 1;
|
getloadavg_initialized = 1;
|
||||||
}
|
}
|
||||||
#endif /* SUNOS_5 */
|
#endif /* SUNOS_5 */
|
||||||
|
|
Loading…
Reference in a new issue