Revert below changes regarding _pinfo::cmdline.
This commit is contained in:
parent
d66ac2bc52
commit
1114c3d059
@ -1,3 +1,7 @@
|
|||||||
|
2003-03-08 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
Revert below changes regarding _pinfo::cmdline.
|
||||||
|
|
||||||
2003-03-08 Corinna Vinschen <corinna@vinschen.de>
|
2003-03-08 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* external.cc (cygwin_internal): Change n to __off64_t to match change
|
* external.cc (cygwin_internal): Change n to __off64_t to match change
|
||||||
|
@ -242,7 +242,7 @@ cygwin_internal (cygwin_getinfo_types t, ...)
|
|||||||
}
|
}
|
||||||
case CW_CMDLINE:
|
case CW_CMDLINE:
|
||||||
{
|
{
|
||||||
__off64_t n;
|
size_t n;
|
||||||
pid_t pid = va_arg (arg, pid_t);
|
pid_t pid = va_arg (arg, pid_t);
|
||||||
pinfo p (pid);
|
pinfo p (pid);
|
||||||
return (DWORD) p->cmdline (n);
|
return (DWORD) p->cmdline (n);
|
||||||
|
@ -367,8 +367,7 @@ fhandler_proc::fill_filebuf ()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static __off64_t
|
||||||
__off64_t
|
|
||||||
format_proc_meminfo (char *destbuf, size_t maxsize)
|
format_proc_meminfo (char *destbuf, size_t maxsize)
|
||||||
{
|
{
|
||||||
unsigned long mem_total = 0UL, mem_free = 0UL, swap_total = 0UL,
|
unsigned long mem_total = 0UL, mem_free = 0UL, swap_total = 0UL,
|
||||||
@ -398,8 +397,7 @@ format_proc_meminfo (char *destbuf, size_t maxsize)
|
|||||||
swap_total >> 10, swap_free >> 10);
|
swap_total >> 10, swap_free >> 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static __off64_t
|
||||||
__off64_t
|
|
||||||
format_proc_uptime (char *destbuf, size_t maxsize)
|
format_proc_uptime (char *destbuf, size_t maxsize)
|
||||||
{
|
{
|
||||||
unsigned long long uptime = 0ULL, idle_time = 0ULL;
|
unsigned long long uptime = 0ULL, idle_time = 0ULL;
|
||||||
@ -429,8 +427,7 @@ format_proc_uptime (char *destbuf, size_t maxsize)
|
|||||||
idle_time / 100, long (idle_time % 100));
|
idle_time / 100, long (idle_time % 100));
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static __off64_t
|
||||||
__off64_t
|
|
||||||
format_proc_stat (char *destbuf, size_t maxsize)
|
format_proc_stat (char *destbuf, size_t maxsize)
|
||||||
{
|
{
|
||||||
unsigned long long user_time = 0ULL, kernel_time = 0ULL, idle_time = 0ULL;
|
unsigned long long user_time = 0ULL, kernel_time = 0ULL, idle_time = 0ULL;
|
||||||
|
@ -300,7 +300,9 @@ fhandler_process::fill_filebuf ()
|
|||||||
{
|
{
|
||||||
if (filebuf)
|
if (filebuf)
|
||||||
free (filebuf);
|
free (filebuf);
|
||||||
filebuf = p->cmdline (filesize);
|
size_t fs;
|
||||||
|
filebuf = p->cmdline (fs);
|
||||||
|
filesize = fs;
|
||||||
if (!filebuf || !*filebuf)
|
if (!filebuf || !*filebuf)
|
||||||
filebuf = strdup ("<defunct>");
|
filebuf = strdup ("<defunct>");
|
||||||
break;
|
break;
|
||||||
@ -363,8 +365,7 @@ fhandler_process::fill_filebuf ()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static __off64_t
|
||||||
__off64_t
|
|
||||||
format_process_stat (_pinfo *p, char *destbuf, size_t maxsize)
|
format_process_stat (_pinfo *p, char *destbuf, size_t maxsize)
|
||||||
{
|
{
|
||||||
char cmd[MAX_PATH];
|
char cmd[MAX_PATH];
|
||||||
@ -499,8 +500,7 @@ format_process_stat (_pinfo *p, char *destbuf, size_t maxsize)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static __off64_t
|
||||||
__off64_t
|
|
||||||
format_process_status (_pinfo *p, char *destbuf, size_t maxsize)
|
format_process_status (_pinfo *p, char *destbuf, size_t maxsize)
|
||||||
{
|
{
|
||||||
char cmd[MAX_PATH];
|
char cmd[MAX_PATH];
|
||||||
@ -593,8 +593,7 @@ format_process_status (_pinfo *p, char *destbuf, size_t maxsize)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static __off64_t
|
||||||
__off64_t
|
|
||||||
format_process_statm (_pinfo *p, char *destbuf, size_t maxsize)
|
format_process_statm (_pinfo *p, char *destbuf, size_t maxsize)
|
||||||
{
|
{
|
||||||
unsigned long vmsize = 0UL, vmrss = 0UL, vmtext = 0UL, vmdata = 0UL,
|
unsigned long vmsize = 0UL, vmrss = 0UL, vmtext = 0UL, vmdata = 0UL,
|
||||||
@ -610,8 +609,7 @@ format_process_statm (_pinfo *p, char *destbuf, size_t maxsize)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static int
|
||||||
int
|
|
||||||
get_process_state (DWORD dwProcessId)
|
get_process_state (DWORD dwProcessId)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -678,8 +676,7 @@ out:
|
|||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static bool
|
||||||
bool
|
|
||||||
get_mem_values (DWORD dwProcessId, unsigned long *vmsize, unsigned long *vmrss,
|
get_mem_values (DWORD dwProcessId, unsigned long *vmsize, unsigned long *vmrss,
|
||||||
unsigned long *vmtext, unsigned long *vmdata,
|
unsigned long *vmtext, unsigned long *vmdata,
|
||||||
unsigned long *vmlib, unsigned long *vmshare)
|
unsigned long *vmlib, unsigned long *vmshare)
|
||||||
|
@ -138,7 +138,7 @@ public:
|
|||||||
void commune_recv ();
|
void commune_recv ();
|
||||||
commune_result commune_send (DWORD);
|
commune_result commune_send (DWORD);
|
||||||
bool alive ();
|
bool alive ();
|
||||||
char *cmdline (__off64_t &);
|
char *cmdline (size_t &);
|
||||||
|
|
||||||
friend void __stdcall set_myself (pid_t, HANDLE);
|
friend void __stdcall set_myself (pid_t, HANDLE);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user