| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Message-Id: <20230508213136.608575-42-bugaevc@gmail.com>
|
|
|
|
| |
Message-Id: <20230508213136.608575-12-bugaevc@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
function declarations.
Most of the changes land in one of these buckets:
* Removed unused declarations.
* Used (void) to represent no parameters instead of () which means an
undeterminate number of parameters.
* Included missing header files whenever necessary (stdlib.h,
sys/mman.h, etc)
* Typedefed function pointers to be able to fully declare the parameter
types.
* Added declarations of library functions that are used elsewhere
(example is libps/ps.h).
* Made functions static whenever they are only used in that file.
* Forwarded declarations of some methods that were made static.
Message-Id: <ZDD1o7/tVYeZew+G@jupiter.tail36e24.ts.net>
|
|
|
|
| |
Message-Id: <20220119192945.36654-5-etienne.brateau@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
* boot/boot.c: Replace bcopy with memcpy or memmove as appropriate.
* exec/hashexec.c: Likewise.
* libps/proclist.c: Likewise, but also fix the amount of data copied.
* libps/procstat.c: Likewise.
* libps/spec.c: Likewise.
* libshouldbeinlibc/cacheq.c: Likewise.
* libshouldbeinlibc/idvec.c: Likewise.
* libshouldbeinlibc/timefmt.c: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
free (NULL) is a nop, therefore it is not necessary to check that
first. Simplify the code accordingly. This commit is the result of
the following semantic patch:
@@
identifier X;
@@
-if (X) free (X);
+free (X);
* console-client/console.c: Simplify accordingly.
* console-client/driver.c: Likewise.
* console-client/vga.c: Likewise.
* ftpfs/dir.c: Likewise.
* libftpconn/unix.c: Likewise.
* libps/fmt.c: Likewise.
* libps/proclist.c: Likewise.
* libstore/mvol.c: Likewise.
* nfs/ops.c: Likewise.
* proc/host.c: Likewise.
* sutils/fstab.c: Likewise.
|
|
|
|
|
| |
Our variants print stack traces on failures. This will make locating
errors much easier.
|
|
|
|
|
|
|
|
|
| |
* context.c (ps_context_find_tty_by_cttyid): int -> mach_port_t
* proclist.c (proc_stat_list_add_all): unsigned -> size_t
(proc_stat_list_add_login_coll): Likewise.
(proc_stat_list_add_session): Likewise.
(proc_stat_list_add_fn_pids): Likewise.
(proc_stat_list_add_id_fn_pids): Likewise.
|
| |
|
| |
|
|
|
|
| |
libraries. Other misc cleanups.
|
|
|
|
|
|
|
|
| |
(proc_stat_list_add_pid): Add and support new return parameter PS.
(proc_stat_list_add_fn_pids, proc_stat_list_add_id_fn_pids,
proc_stat_list_add_all, proc_stat_list_add_login_coll,
proc_stat_list_add_session, proc_stat_list_add_pgrp):
Add and support new return parameters PROC_STATS & NUM_PROCS.
|
|
|
|
| |
Use new STREAM parameter instead of old one and count.
|
|
|
|
|
| |
(proc_stat_list_spec_nominal): New function for deciding if a particular spec
is always nominal.
|
|
|
|
|
|
|
| |
Factor out most of proc_stat_list_add_all, proc_stat_list_add_login_coll, and
proc_stat_list_add_session into proc_stat_list_add_[id_]fn_pids.
(proc_stat_list_add_pgrp): New function, adds pids for a pgrp.
Tighten up types used (i.e., don't use int for everything).
|
|
|
|
|
|
|
| |
server (but we can get the proc server from the context).
We no longer create or free proc_stat_ts; we leave that up to our ps_context,
except in the case of thread proc_stats.
Add the inverse of proc_stat_list_add_threads, proc_stat_list_remove_threads.
|
|
|