[PATCH 2/3] trans: populate the mtab on demand

2013-11-20 Thread Justus Winter
Previously the mtab content was generated in the open hook. Delay this until the data is needed. A follow up patch will take advantage of this to both simplify the logic in mtab_populate and make it more robust at the same time. * trans/mtab.c (open_hook): Do not eagerly populate the mtab. (trivfs

[PATCH 1/3] trans: make the mtab translator a multithreaded server

2013-11-20 Thread Justus Winter
* trans/mtab.c (main): Use ports_manage_port_operations_multithread. --- trans/mtab.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/trans/mtab.c b/trans/mtab.c index 250de7d..4d10632 100644 --- a/trans/mtab.c +++ b/trans/mtab.c @@ -233,9 +233,13 @@ main (int argc

[PATCH 3/3] trans: remove the loop detection logic from the mtab translator

2013-11-20 Thread Justus Winter
Previously the mtab detector tried to detect whether it talks to itself by comparing the control port of the translator it currently visits with its own. This was done to prevent deadlocks. However, this did not detect non-trivial loops, i.e. two mtab translators would still dead-lock each other.

Re: [PATCH 2/3] trans: populate the mtab on demand

2013-11-20 Thread Richard Braun
On Wed, Nov 20, 2013 at 11:10:07AM +0100, Justus Winter wrote: > Previously the mtab content was generated in the open hook. Delay this > until the data is needed. A follow up patch will take advantage of > this to both simplify the logic in mtab_populate and make it more > robust at the same time.

Re: [PATCH 2/3] trans: populate the mtab on demand

2013-11-20 Thread Justus Winter
Quoting Richard Braun (2013-11-20 12:13:20) > On Wed, Nov 20, 2013 at 11:10:07AM +0100, Justus Winter wrote: > > Previously the mtab content was generated in the open hook. Delay this > > until the data is needed. A follow up patch will take advantage of > > this to both simplify the logic in mtab_

[PATCH 01/19] ddb: fix implicit declaration of functions

2013-11-20 Thread Marin Ramesa
* ddb/db_break.c: Don't include ddb/db_access.h (DB_CHECK_ACCESS() and DB_PHYS_EQ() are no longer needed) Remove register qualifier. Use db_is_current_task() instead of DB_CHECK_ACCESS(). Remove dead code around DB_PHYS_EQ() call. --- ddb/db_break.c | 12 1 file changed, 4 insertion

[PATCH 08/19] ddb/db_run.c: trivial stylistic fix for consistency

2013-11-20 Thread Marin Ramesa
* ddb/db_run.c: Trivial stylistic fix for consistency. --- ddb/db_run.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddb/db_run.c b/ddb/db_run.c index 01893db..22cd358 100644 --- a/ddb/db_run.c +++ b/ddb/db_run.c @@ -188,7 +188,7 @@ db_restart_at_pc(watchpt, task)

[PATCH 03/19] Fix call of function with qualified void return type

2013-11-20 Thread Marin Ramesa
* ddb/db_command.c [DB_MACHINE_COMMANDS]: Add comment after endif. * i386/i386/setjmp.h (_longjmp): Comment out __volatile__. --- ddb/db_command.c | 2 +- i386/i386/setjmp.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ddb/db_command.c b/ddb/db_command.c index 6cca94b.

[PATCH 09/19] ddb/db_run.c: move declaration of brpc into SOFTWARE_SSTEP

2013-11-20 Thread Marin Ramesa
* ddb/db_run.c (brpc): Move declaration into SOFTWARE_SSTEP code. --- ddb/db_run.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ddb/db_run.c b/ddb/db_run.c index 22cd358..60b34bf 100644 --- a/ddb/db_run.c +++ b/ddb/db_run.c @@ -171,7 +171,7 @@ db_restart_at_pc(watchpt, ta

Fixes for GCC warnings when building with --enable-kdb

2013-11-20 Thread Marin Ramesa
These are the fixes for GCC warnings when building with --enable-kdb. I did not fix all warnings, some are left. [PATCH 01/19] ddb: fix implicit declaration of functions [PATCH 02/19] ddb/db_break.c: quiet GCC warning about uninitialized variable [PATCH 03/19] Fix call of function with qualified

[PATCH 05/19] ddb/db_expr.h: remove (db_addr_t *) argument name

2013-11-20 Thread Marin Ramesa
* ddb/db_expr.h (db_expression): Remove (db_addr_t *) argument name. --- ddb/db_expr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddb/db_expr.h b/ddb/db_expr.h index 989b66b..6a24ccd 100644 --- a/ddb/db_expr.h +++ b/ddb/db_expr.h @@ -21,6 +21,6 @@ int db_size_option(

[PATCH 10/19] ddb/db_sym.c: add parentheses around assignment used as truth value

2013-11-20 Thread Marin Ramesa
* ddb/db_sym.c: Add parentheses around assignment used as truth value. --- ddb/db_sym.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddb/db_sym.c b/ddb/db_sym.c index 98f265e..dad0ead 100644 --- a/ddb/db_sym.c +++ b/ddb/db_sym.c @@ -276,7 +276,7 @@ db_name_is_ambiguous(sym_

[PATCH 11/19] ddb/db_variables.c: fix initializations from incompatible pointer type

2013-11-20 Thread Marin Ramesa
* ddb/db_variables.c (db_set_default_thread, db_get_task_thread, db_arg_variable, fcn): Declare long return type. --- ddb/db_variables.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ddb/db_variables.c b/ddb/db_variables.c index 54fc06c..3a12e4a 100644 --- a/ddb/db

[PATCH 07/19] ddb/db_run.c: remove set but unused variable

2013-11-20 Thread Marin Ramesa
* ddb/db_run.c (ins): Remove variable. --- ddb/db_run.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ddb/db_run.c b/ddb/db_run.c index 7aaeb46..01893db 100644 --- a/ddb/db_run.c +++ b/ddb/db_run.c @@ -176,14 +176,13 @@ db_restart_at_pc(watchpt, task) if ((db_

[PATCH 02/19] ddb/db_break.c: quiet GCC warning about uninitialized variable

2013-11-20 Thread Marin Ramesa
* ddb/db_break.c (bkpt): Initialize. --- ddb/db_break.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddb/db_break.c b/ddb/db_break.c index 554dd30..9e316e3 100644 --- a/ddb/db_break.c +++ b/ddb/db_break.c @@ -622,7 +622,7 @@ db_delete_cmd() } if (t == tHASH)

[PATCH 17/19] i386/i386at/kd.c: add forward declaration

2013-11-20 Thread Marin Ramesa
* i386/i386at/kd.c [MACH_KDB] (kdb_kintr): Add forward declaration. --- i386/i386at/kd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c index 3890c3d..a5dff3c 100644 --- a/i386/i386at/kd.c +++ b/i386/i386at/kd.c @@ -965,6 +965,9 @@ boolean_t up;

[PATCH 06/19] ddb: fix implicit declaration of function

2013-11-20 Thread Marin Ramesa
* ddb/db_variables.c (db_read_write_variable): Remove forward declaration. * ddb/db_variables.h (db_read_write_variable): Add prototype. --- ddb/db_variables.c | 3 --- ddb/db_variables.h | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ddb/db_variables.c b/ddb/db_variables.

[PATCH 04/19] ddb/db_examine.c: fix signedness

2013-11-20 Thread Marin Ramesa
ddb/db_examine.c (addr, count): Cast to (db_expr_t *). --- ddb/db_examine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ddb/db_examine.c b/ddb/db_examine.c index 071ca8f..31f77bd 100644 --- a/ddb/db_examine.c +++ b/ddb/db_examine.c @@ -394,7 +394,7 @@ db_search_cmd()

[PATCH 15/19] device/net_io.c: quiet the warning about uninitialized variable

2013-11-20 Thread Marin Ramesa
* device/net_io.c (hash_entp): Initialize. --- device/net_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device/net_io.c b/device/net_io.c index 1958840..857fc89 100644 --- a/device/net_io.c +++ b/device/net_io.c @@ -1158,7 +1158,7 @@ net_set_filter(ifp, rcv_port, priori

[PATCH 14/19] kern/xpr.c: quiet warning about uninitialized variable

2013-11-20 Thread Marin Ramesa
* kern/xpr.c (s): Initialize. --- kern/xpr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kern/xpr.c b/kern/xpr.c index af871a2..b482a12 100644 --- a/kern/xpr.c +++ b/kern/xpr.c @@ -154,7 +154,7 @@ void xpr_dump(base, nbufs) struct xprbuf *last, *ptr; struct

[PATCH 13/19] kern/startup.c: fix implicit declaration of function

2013-11-20 Thread Marin Ramesa
* kern/startup.c [MACH_KDB]: Include device/cons.h. --- kern/startup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kern/startup.c b/kern/startup.c index 5e35b98..22e9997 100644 --- a/kern/startup.c +++ b/kern/startup.c @@ -58,7 +58,9 @@ #include #include - +#if MA

[PATCH 16/19] Fix implicit declaration of function

2013-11-20 Thread Marin Ramesa
* ddb/db_sym.c (aout_db_sym_init): Remove forward declaration. * ddb/db_sym.h (aout_db_sym_init): Add prototype. * i386/i386at/model_dep.c (aout_db_sym_init): Fix call. [MACH_KDB]: Include ddb/db_sym.h. [MACH_KDB]: Add comment after else and endif. --- ddb/db_sym.c| 2 +- ddb/db_sym.h

[PATCH 12/19] ipc/ipc_print.h: include ipc/ipc_pset.h for ipc_pset_t

2013-11-20 Thread Marin Ramesa
* ipc/ipc_print.h: Include ipc/ipc_pset.h for ipc_pset_t. --- ipc/ipc_print.h | 1 + 1 file changed, 1 insertion(+) diff --git a/ipc/ipc_print.h b/ipc/ipc_print.h index d1fef7e..0a3f645 100644 --- a/ipc/ipc_print.h +++ b/ipc/ipc_print.h @@ -24,6 +24,7 @@ #include #include #include +#includ

[PATCH 19/19] i386/i386/db_interface.c: fix implicit declaration of function

2013-11-20 Thread Marin Ramesa
* i386/i386/db_interface.c: Include vm/vm_fault.h. --- i386/i386/db_interface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/i386/i386/db_interface.c b/i386/i386/db_interface.c index 8282b0f..b2c0e33 100644 --- a/i386/i386/db_interface.c +++ b/i386/i386/db_interface.c @@ -43,6 +43,7 @@

[PATCH 18/19] i386/i386/db_interface.c: add forward declaration

2013-11-20 Thread Marin Ramesa
* i386/i386/db_interface.c (cnpollc): Add forward declaration. --- i386/i386/db_interface.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/i386/i386/db_interface.c b/i386/i386/db_interface.c index f89576d..8282b0f 100644 --- a/i386/i386/db_interface.c +++ b/i386/i386/db_interface.c @@ -228

Re: [PATCH 2/3] trans: populate the mtab on demand

2013-11-20 Thread Richard Braun
On Wed, Nov 20, 2013 at 01:18:17PM +0100, Justus Winter wrote: > Quoting Richard Braun (2013-11-20 12:13:20) > > I'm not sure to grasp the relation between this patch and deadlock > > avoidance. I also don't see what's wrong with generating data at open > > time. > > Suppose you have > > settra

[PATCH 01/12] init: remove unused function run_for_real

2013-11-20 Thread Justus Winter
* init/init.c (run_for_real): Remove function. --- init/init.c | 89 --- 1 file changed, 89 deletions(-) diff --git a/init/init.c b/init/init.c index de5dd6b..0adde79 100644 --- a/init/init.c +++ b/init/init.c @@ -405,95 +405,6 @@ run (con

[PATCH 04/12] libnetfs: fix a dead store

2013-11-20 Thread Justus Winter
* libnetfs/fsys-getroot.c (netfs_S_fsys_getroot): Fix dead store. --- libnetfs/fsys-getroot.c |1 - 1 file changed, 1 deletion(-) diff --git a/libnetfs/fsys-getroot.c b/libnetfs/fsys-getroot.c index 0d80111..d3dda17 100644 --- a/libnetfs/fsys-getroot.c +++ b/libnetfs/fsys-getroot.c @@ -84,7 +

[PATCH 02/12] utils: fix dead initialization

2013-11-20 Thread Justus Winter
Found using the Clang Static Analyzer. * utils/frobauth.c (posix_parse_opt): Fix dead initialization. (no_ugids_parse_opt): Likewise. --- utils/frobauth.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/frobauth.c b/utils/frobauth.c index ccb7c3b..44690d8 100644 -

[PATCH 05/12] fatfs: fix error handling in diskfs_lookup_hard

2013-11-20 Thread Justus Winter
Found using the Clang Static Analyzer. * fatfs/dir.c (diskfs_lookup_hard): Fix error handling. --- fatfs/dir.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/fatfs/dir.c b/fatfs/dir.c index b2b7d7e..60fc898 100644 --- a/fatfs/dir.c +++ b/fatfs/dir.c @@ -231,6 +231,8 @@ diskfs_lookup_har

[PATCH 12/12] libshouldbeinlibc: fix error handling in maptime_map

2013-11-20 Thread Justus Winter
Found using the Clang Static Analyzer. * libshouldbeinlibc/maptime.c (maptime_map): Fix error handling. --- libshouldbeinlibc/maptime.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libshouldbeinlibc/maptime.c b/libshouldbeinlibc/maptime.c index 971e05f..ca3

[PATCH 03/12] libps: fix the length computation in fprint_frac_value

2013-11-20 Thread Justus Winter
Found using the Clang Static Analyzer. * libps/spec.c (fprint_frac_value): Fix computation of value_len. --- libps/spec.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libps/spec.c b/libps/spec.c index b34a234..146aba5 100644 --- a/libps/spec.c +++ b/libps/spec.c @@ -416,

[PATCH 09/12] usermux: actually use the computed flags value in netfs_attempt_utimes

2013-11-20 Thread Justus Winter
If either atime or mtime is NULL, the respective time should be set to the current time. Found using the Clang Static Analyzer. * usermux/node.c (netfs_attempt_utimes): Use flags in call to fshelp_touch. --- usermux/node.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[PATCH 08/12] nfsd: fix error handling in op_remove

2013-11-20 Thread Justus Winter
Found using the Clang Static Analyzer. * nfsd/ops.c (op_remove): Fix error handling. --- nfsd/ops.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nfsd/ops.c b/nfsd/ops.c index d503290..6e2cbb1 100644 --- a/nfsd/ops.c +++ b/nfsd/ops.c @@ -398,7 +398,7 @@ op_remove (struct

[PATCH 06/12] fatfs: fix error handling in diskfs_get_directs

2013-11-20 Thread Justus Winter
Found using the Clang Static Analyzer. * fatfs/dir.c (diskfs_get_directs): Fix error handling. --- fatfs/dir.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/fatfs/dir.c b/fatfs/dir.c index 60fc898..5a38c63 100644 --- a/fatfs/dir.c +++ b/fatfs/dir.c @@ -865,6 +865,8 @@ diskfs_get_direct

[PATCH 07/12] ftpfs: fix error handling in refresh_dir

2013-11-20 Thread Justus Winter
Found using the Clang Static Analyzer. * ftpfs/dir.c (refresh_dir): Fix error handling. --- ftpfs/dir.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ftpfs/dir.c b/ftpfs/dir.c index da5ddbe..61c337b 100644 --- a/ftpfs/dir.c +++ b/ftpfs/dir.c @@ -381,8 +381,12 @@

[PATCH 11/12] mach-defpager: drop all register qualifiers

2013-11-20 Thread Justus Winter
* mach-defpager/default_pager.c: Drop register qualifiers. * mach-defpager/kalloc.c: Likewise. * mach-defpager/queue.h: Likewise. * mach-defpager/wiring.c: Likewise. --- mach-defpager/default_pager.c | 182 - mach-defpager/kalloc.c| 10 +-- mach-d

[PATCH 10/12] libshouldbeinlibc: fix dead initialization in fmt_named_interval

2013-11-20 Thread Justus Winter
Found using the Clang Static Analyzer. * libshouldbeinlibc/timefmt.c (fmt_named_interval): Fix dead initialization by declaring ts in the loop. --- libshouldbeinlibc/timefmt.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libshouldbeinlibc/timefmt.c b/libshouldbeinlib

Re: [PATCH 01/19] ddb: fix implicit declaration of functions

2013-11-20 Thread Marin Ramesa
On 20.11.2013 13:53:43, Marin Ramesa wrote: > * ddb/db_break.c: Don't include ddb/db_access.h (DB_CHECK_ACCESS() > and DB_PHYS_EQ() are no longer needed) > Remove register qualifier. > Use db_is_current_task() instead of DB_CHECK_ACCESS(). > Remove dead code around DB_PHYS_EQ() call. This patch i

[PATCH 02/11] i386/i386/db_interface.c: fix assignment from incompatible pointer type

2013-11-20 Thread Marin Ramesa
* i386/i386/db_interface.c (skaddr): Cast to (unsigned *). --- i386/i386/db_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/i386/db_interface.c b/i386/i386/db_interface.c index 50b5e82..c19be07 100644 --- a/i386/i386/db_interface.c +++ b/i386/i386/db_interface

[PATCH 05/11] i386/i386/db_interface.c: add comments after else and endif

2013-11-20 Thread Marin Ramesa
* i386/i386/db_interface.c [GNU]: Add comments after else and endif. --- i386/i386/db_interface.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/i386/i386/db_interface.c b/i386/i386/db_interface.c index f363a2f..d8d5b9b 100644 --- a/i386/i386/db_interface.c +++ b/i

[PATCH 01/11] i386/i386/db_interface.c: fix passing from incompatible pointer type

2013-11-20 Thread Marin Ramesa
* i386/i386/db_interface.c (db_user_to_kernel_address): Cast argument 3 to (unsigned int *). --- i386/i386/db_interface.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/i386/i386/db_interface.c b/i386/i386/db_interface.c index f89576d..50b5e82 100644 --- a/i386/i386/

[PATCH 03/11] i386/i386/db_interface.c: fix implicit declaration of function

2013-11-20 Thread Marin Ramesa
* i386/i386/db_interface.c: Include string.h. --- i386/i386/db_interface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/i386/i386/db_interface.c b/i386/i386/db_interface.c index c19be07..f2662b0 100644 --- a/i386/i386/db_interface.c +++ b/i386/i386/db_interface.c @@ -27,6 +27,7 @@ * Inte

[PATCH 06/11] i386/i386/db_interface.c: comment function and the calls

2013-11-20 Thread Marin Ramesa
* i386/i386/db_interface.c (db_search_null): Comment unused function and the calls in the never reached code. --- i386/i386/db_interface.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/i386/i386/db_interface.c b/i386/i386/db_interface.c index d8d5b9b..12e59ca 10064

[PATCH 04/11] i386/i386/db_interface.c: remove return value

2013-11-20 Thread Marin Ramesa
Void function returns with FALSE. Remove return value. * i386/i386/db_interface.c (db_task_name): Remove return value. --- i386/i386/db_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/i386/db_interface.c b/i386/i386/db_interface.c index f2662b0..f363a2f 10064

[PATCH 07/11] i386/i386/db_trace.c: cast to (int *)

2013-11-20 Thread Marin Ramesa
* i386/i386/db_trace.c (db_lookup_i386_kreg): Cast argument 2 to (int *). --- i386/i386/db_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/i386/db_trace.c b/i386/i386/db_trace.c index d7e1345..ac81156 100644 --- a/i386/i386/db_trace.c +++ b/i386/i386/db_trace.c @@

[PATCH 08/11] i386/i386/db_trace.c: fix implicit declaration of function

2013-11-20 Thread Marin Ramesa
* i386/i386/db_trace.c: Include machine/db_interface.h. --- i386/i386/db_trace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/i386/i386/db_trace.c b/i386/i386/db_trace.c index ac81156..de6f665 100644 --- a/i386/i386/db_trace.c +++ b/i386/i386/db_trace.c @@ -35,6 +35,7 @@ #include #inc

[PATCH 11/11] i386/i386/trap.c: fix implicit declaration of function

2013-11-20 Thread Marin Ramesa
* i386/i386/trap.c: Include machine/db_interface.h. --- i386/i386/trap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/i386/i386/trap.c b/i386/i386/trap.c index f483497..89d1f3d 100644 --- a/i386/i386/trap.c +++ b/i386/i386/trap.c @@ -37,6 +37,7 @@ #include #include #include/* for

[PATCH 09/11] i386/i386/db_trace.c: don't cast to db_addr_t

2013-11-20 Thread Marin Ramesa
* i386/i386/db_trace.c (db_check_thread_address_valid): Don't cast argument 1 to db_addr_t. --- i386/i386/db_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/i386/db_trace.c b/i386/i386/db_trace.c index de6f665..419fa0c 100644 --- a/i386/i386/db_trace.c +++ b/i386

[PATCH 10/11] i386/i386/db_trace.c: return reg value

2013-11-20 Thread Marin Ramesa
* i386/i386/db_trace.c (db_i386_reg_value): Return reg value. --- i386/i386/db_trace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/i386/i386/db_trace.c b/i386/i386/db_trace.c index 419fa0c..71b7620 100644 --- a/i386/i386/db_trace.c +++ b/i386/i386/db_trace.c @@ -178,6 +178,7 @@ db_i386_re

Re: [PATCH 09/19] ddb/db_run.c: move declaration of brpc into SOFTWARE_SSTEP

2013-11-20 Thread Guillem Jover
Hi! On Wed, 2013-11-20 at 13:53:51 +0100, Marin Ramesa wrote: > diff --git a/ddb/db_run.c b/ddb/db_run.c > index 22cd358..60b34bf 100644 > --- a/ddb/db_run.c > +++ b/ddb/db_run.c > @@ -171,7 +171,7 @@ db_restart_at_pc(watchpt, task) > boolean_t watchpt; > task_ttask; > { > - d

Re: [PATCH 03/19] Fix call of function with qualified void return type

2013-11-20 Thread Guillem Jover
On Wed, 2013-11-20 at 13:53:45 +0100, Marin Ramesa wrote: > * ddb/db_command.c [DB_MACHINE_COMMANDS]: Add comment after endif. > * i386/i386/setjmp.h (_longjmp): Comment out __volatile__. (This patch seems to mix two unrelated changes, at least from the patch description PoV.) > diff --git a/i386

Re: [PATCH 05/19] ddb/db_expr.h: remove (db_addr_t *) argument name

2013-11-20 Thread Guillem Jover
On Wed, 2013-11-20 at 13:53:47 +0100, Marin Ramesa wrote: > * ddb/db_expr.h (db_expression): Remove (db_addr_t *) argument name. Do you mean db_expr_t? > --- > ddb/db_expr.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ddb/db_expr.h b/ddb/db_expr.h > index 989b66b..6

Re: [PATCH 10/19] ddb/db_sym.c: add parentheses around assignment used as truth value

2013-11-20 Thread Guillem Jover
On Wed, 2013-11-20 at 13:53:52 +0100, Marin Ramesa wrote: > diff --git a/ddb/db_sym.c b/ddb/db_sym.c > index 98f265e..dad0ead 100644 > --- a/ddb/db_sym.c > +++ b/ddb/db_sym.c > @@ -276,7 +276,7 @@ db_name_is_ambiguous(sym_name) > > for (i = 0; i < db_nsymtab; i++) { > db_sym_t

Re: [PATCH 17/19] i386/i386at/kd.c: add forward declaration

2013-11-20 Thread Guillem Jover
On Wed, 2013-11-20 at 13:53:59 +0100, Marin Ramesa wrote: > diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c > index 3890c3d..a5dff3c 100644 > --- a/i386/i386at/kd.c > +++ b/i386/i386at/kd.c > @@ -965,6 +965,9 @@ boolean_t up; > return(state); > } > > +#if MACH_KDB > +extern void kdb_kintr

Re: [PATCH 18/19] i386/i386/db_interface.c: add forward declaration

2013-11-20 Thread Guillem Jover
On Wed, 2013-11-20 at 13:54:00 +0100, Marin Ramesa wrote: > diff --git a/i386/i386/db_interface.c b/i386/i386/db_interface.c > index f89576d..8282b0f 100644 > --- a/i386/i386/db_interface.c > +++ b/i386/i386/db_interface.c > @@ -228,6 +228,8 @@ kdbprinttrap(type, code) > extern jmp_buf_t *db_recov

Re: [PATCH 05/19] ddb/db_expr.h: remove (db_addr_t *) argument name

2013-11-20 Thread Marin Ramesa
On 20.11.2013 21:19:24, Guillem Jover wrote: > On Wed, 2013-11-20 at 13:53:47 +0100, Marin Ramesa wrote: > > * ddb/db_expr.h (db_expression): Remove (db_addr_t *) argument > name. > > Do you mean db_expr_t? No, (db_addr_t *). > > --- > > ddb/db_expr.h | 2 +- > > 1 file changed, 1 insertion(+)

Re: [PATCH 03/19] Fix call of function with qualified void return type

2013-11-20 Thread Marin Ramesa
On 20.11.2013 21:18:14, Guillem Jover wrote: > On Wed, 2013-11-20 at 13:53:45 +0100, Marin Ramesa wrote: > > * ddb/db_command.c [DB_MACHINE_COMMANDS]: Add comment after endif. > > * i386/i386/setjmp.h (_longjmp): Comment out __volatile__. > > (This patch seems to mix two unrelated changes, at leas

Re: [PATCH 09/19] ddb/db_run.c: move declaration of brpc into SOFTWARE_SSTEP

2013-11-20 Thread Marin Ramesa
On 20.11.2013 21:09:08, Guillem Jover wrote: > This adds intermixing of statements and declarations. Is that not desireable. In this way GCC doesn't complain about unused variable.

Re: [PATCH 17/19] i386/i386at/kd.c: add forward declaration

2013-11-20 Thread Marin Ramesa
On 20.11.2013 21:29:06, Guillem Jover wrote: > On Wed, 2013-11-20 at 13:53:59 +0100, Marin Ramesa wrote: > > diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c > > index 3890c3d..a5dff3c 100644 > > --- a/i386/i386at/kd.c > > +++ b/i386/i386at/kd.c > > @@ -965,6 +965,9 @@ boolean_t up; > > r

Re: [PATCH 18/19] i386/i386/db_interface.c: add forward declaration

2013-11-20 Thread Marin Ramesa
On 20.11.2013 21:29:59, Guillem Jover wrote: > On Wed, 2013-11-20 at 13:54:00 +0100, Marin Ramesa wrote: > > diff --git a/i386/i386/db_interface.c b/i386/i386/db_interface.c > > index f89576d..8282b0f 100644 > > --- a/i386/i386/db_interface.c > > +++ b/i386/i386/db_interface.c > > @@ -228,6 +228,8

Re: [PATCH 05/19] ddb/db_expr.h: remove (db_addr_t *) argument name

2013-11-20 Thread Samuel Thibault
Marin Ramesa, le Wed 20 Nov 2013 21:31:33 +0100, a écrit : > On 20.11.2013 21:19:24, Guillem Jover wrote: > > On Wed, 2013-11-20 at 13:53:47 +0100, Marin Ramesa wrote: > > > -int db_expression(db_expr_t *valuep); > > > +int db_expression(db_expr_t *); > > > > Why? > > It seems there is a collisio

Re: [PATCH 09/19] ddb/db_run.c: move declaration of brpc into SOFTWARE_SSTEP

2013-11-20 Thread Samuel Thibault
Guillem Jover, le Wed 20 Nov 2013 21:09:08 +0100, a écrit : > > #ifdef SOFTWARE_SSTEP > > + db_addr_t brpc; > > /* Account for instructions in delay slots */ > > brpc = next_instr_address(pc, 1, task); > > if ((brpc != pc) && (inst_branch(ins) || inst_call(ins)))

Re: [PATCH 10/19] ddb/db_sym.c: add parentheses around assignment used as truth value

2013-11-20 Thread Samuel Thibault
Guillem Jover, le Wed 20 Nov 2013 21:20:25 +0100, a écrit : > On Wed, 2013-11-20 at 13:53:52 +0100, Marin Ramesa wrote: > > diff --git a/ddb/db_sym.c b/ddb/db_sym.c > > index 98f265e..dad0ead 100644 > > --- a/ddb/db_sym.c > > +++ b/ddb/db_sym.c > > @@ -276,7 +276,7 @@ db_name_is_ambiguous(sym_name)

Re: [PATCH 15/19] device/net_io.c: quiet the warning about uninitialized variable

2013-11-20 Thread Samuel Thibault
Marin Ramesa, le Wed 20 Nov 2013 13:53:57 +0100, a écrit : > * device/net_io.c (hash_entp): Initialize. It doesn't seem so clear that it's actually always properly initialized. We also need a comment explaining why it always is. > --- > device/net_io.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [PATCH 01/11] i386/i386/db_interface.c: fix passing from incompatible pointer type

2013-11-20 Thread Samuel Thibault
Marin Ramesa, le Wed 20 Nov 2013 20:42:45 +0100, a écrit : > * i386/i386/db_interface.c (db_user_to_kernel_address): Cast argument 3 to > (unsigned int *). db_user_to_kernel_address should rather be made to take a vm_offset_t*, and caller use that, instead of unsigned int, for their variables. T

Re: [PATCH 02/11] i386/i386/db_interface.c: fix assignment from incompatible pointer type

2013-11-20 Thread Samuel Thibault
Marin Ramesa, le Wed 20 Nov 2013 20:42:46 +0100, a écrit : > * i386/i386/db_interface.c (skaddr): Cast to (unsigned *). Same here, use vm_offset_t type for vaddr and kaddr. > --- > i386/i386/db_interface.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/i386/i386/db_int

Re: [PATCH 05/19] ddb/db_expr.h: remove (db_addr_t *) argument name

2013-11-20 Thread Marin Ramesa
On 20.11.2013 21:44:22, Samuel Thibault wrote: > Marin Ramesa, le Wed 20 Nov 2013 21:31:33 +0100, a écrit : > > On 20.11.2013 21:19:24, Guillem Jover wrote: > > > On Wed, 2013-11-20 at 13:53:47 +0100, Marin Ramesa wrote: > > > > -int db_expression(db_expr_t *valuep); > > > > +int db_expression(db_e

Re: [PATCH 07/11] i386/i386/db_trace.c: cast to (int *)

2013-11-20 Thread Samuel Thibault
Marin Ramesa, le Wed 20 Nov 2013 20:42:51 +0100, a écrit : > * i386/i386/db_trace.c (db_lookup_i386_kreg): Cast argument 2 to (int *). db_lookup_i386_kreg should rather use long * > --- > i386/i386/db_trace.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/i386/i386/db_

Re: [PATCH 10/11] i386/i386/db_trace.c: return reg value

2013-11-20 Thread Samuel Thibault
Marin Ramesa, le Wed 20 Nov 2013 20:42:54 +0100, a écrit : > * i386/i386/db_trace.c (db_i386_reg_value): Return reg value. I don't see the returned value used anywhere. I'd say rather drop it than returning something which is already returned another way. > --- > i386/i386/db_trace.c | 1 + > 1

Re: [PATCH 05/19] ddb/db_expr.h: remove (db_addr_t *) argument name

2013-11-20 Thread Samuel Thibault
Marin Ramesa, le Wed 20 Nov 2013 21:59:26 +0100, a écrit : > On 20.11.2013 21:44:22, Samuel Thibault wrote: > > Marin Ramesa, le Wed 20 Nov 2013 21:31:33 +0100, a écrit : > > > On 20.11.2013 21:19:24, Guillem Jover wrote: > > > > On Wed, 2013-11-20 at 13:53:47 +0100, Marin Ramesa wrote: > > > > > -

Re: [PATCH 17/19] i386/i386at/kd.c: add forward declaration

2013-11-20 Thread Samuel Thibault
Marin Ramesa, le Wed 20 Nov 2013 21:38:05 +0100, a écrit : > On 20.11.2013 21:29:06, Guillem Jover wrote: > > On Wed, 2013-11-20 at 13:53:59 +0100, Marin Ramesa wrote: > > > diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c > > > index 3890c3d..a5dff3c 100644 > > > --- a/i386/i386at/kd.c > > > +++ b

Re: [PATCH 10/11] i386/i386/db_trace.c: return reg value

2013-11-20 Thread Marin Ramesa
On 20.11.2013 22:10:54, Samuel Thibault wrote: > Marin Ramesa, le Wed 20 Nov 2013 20:42:54 +0100, a écrit : > > * i386/i386/db_trace.c (db_i386_reg_value): Return reg value. > > I don't see the returned value used anywhere. I'd say rather drop it > than returning something which is already return

Re: [PATCH 10/11] i386/i386/db_trace.c: return reg value

2013-11-20 Thread Samuel Thibault
Marin Ramesa, le Wed 20 Nov 2013 22:22:41 +0100, a écrit : > On 20.11.2013 22:10:54, Samuel Thibault wrote: > > Marin Ramesa, le Wed 20 Nov 2013 20:42:54 +0100, a écrit : > > > * i386/i386/db_trace.c (db_i386_reg_value): Return reg value. > > > > I don't see the returned value used anywhere. I'd

Re: [PATCH 05/19] ddb/db_expr.h: remove (db_addr_t *) argument name

2013-11-20 Thread Marin Ramesa
On 20.11.2013 22:13:34, Samuel Thibault wrote: > Marin Ramesa, le Wed 20 Nov 2013 21:59:26 +0100, a écrit : > > On 20.11.2013 21:44:22, Samuel Thibault wrote: > > > Marin Ramesa, le Wed 20 Nov 2013 21:31:33 +0100, a écrit : > > > > On 20.11.2013 21:19:24, Guillem Jover wrote: > > > > > On Wed, 2013

Re: [PATCH 02/12] utils: fix dead initialization

2013-11-20 Thread Samuel Thibault
Justus Winter, le Wed 20 Nov 2013 14:37:55 +0100, a écrit : > Found using the Clang Static Analyzer. > > * utils/frobauth.c (posix_parse_opt): Fix dead initialization. > (no_ugids_parse_opt): Likewise. Ack. > --- > utils/frobauth.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [PATCH 03/12] libps: fix the length computation in fprint_frac_value

2013-11-20 Thread Samuel Thibault
Justus Winter, le Wed 20 Nov 2013 14:37:56 +0100, a écrit : > Found using the Clang Static Analyzer. > > * libps/spec.c (fprint_frac_value): Fix computation of value_len. Ack. > --- > libps/spec.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libps/spec.c b/libps/

Re: [PATCH 04/12] libnetfs: fix a dead store

2013-11-20 Thread Samuel Thibault
Justus Winter, le Wed 20 Nov 2013 14:37:57 +0100, a écrit : > * libnetfs/fsys-getroot.c (netfs_S_fsys_getroot): Fix dead store. I'm undecided. Setting err to 0 makes it coherent with the rest, even if it is not actually used. > --- > libnetfs/fsys-getroot.c |1 - > 1 file changed, 1 deletion

Re: [PATCH 09/19] ddb/db_run.c: move declaration of brpc into SOFTWARE_SSTEP

2013-11-20 Thread Guillem Jover
On Wed, 2013-11-20 at 21:48:14 +0100, Samuel Thibault wrote: > Guillem Jover, le Wed 20 Nov 2013 21:09:08 +0100, a écrit : > > > #ifdef SOFTWARE_SSTEP > > > + db_addr_t brpc; > > > /* Account for instructions in delay slots */ > > > brpc = next_instr_address(pc, 1, task); > > >

Re: [PATCH 05/12] fatfs: fix error handling in diskfs_lookup_hard

2013-11-20 Thread Samuel Thibault
Justus Winter, le Wed 20 Nov 2013 14:37:58 +0100, a écrit : > Found using the Clang Static Analyzer. > > * fatfs/dir.c (diskfs_lookup_hard): Fix error handling. Ack. > --- > fatfs/dir.c |2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fatfs/dir.c b/fatfs/dir.c > index b2b7d7e..60f

Re: [PATCH 06/12] fatfs: fix error handling in diskfs_get_directs

2013-11-20 Thread Samuel Thibault
Justus Winter, le Wed 20 Nov 2013 14:37:59 +0100, a écrit : > Found using the Clang Static Analyzer. > > * fatfs/dir.c (diskfs_get_directs): Fix error handling. Ack. > --- > fatfs/dir.c |2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fatfs/dir.c b/fatfs/dir.c > index 60fc898..5a3

Re: [PATCH 09/12] usermux: actually use the computed flags value in netfs_attempt_utimes

2013-11-20 Thread Samuel Thibault
Justus Winter, le Wed 20 Nov 2013 14:38:02 +0100, a écrit : > If either atime or mtime is NULL, the respective time should be set to > the current time. > > Found using the Clang Static Analyzer. > > * usermux/node.c (netfs_attempt_utimes): Use flags in call to > fshelp_touch. Ack. > --- > u

Re: [PATCH 08/12] nfsd: fix error handling in op_remove

2013-11-20 Thread Samuel Thibault
Justus Winter, le Wed 20 Nov 2013 14:38:01 +0100, a écrit : > Found using the Clang Static Analyzer. > > * nfsd/ops.c (op_remove): Fix error handling. Ack. > --- > nfsd/ops.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/nfsd/ops.c b/nfsd/ops.c > index d503290..6e

Re: [PATCH 07/12] ftpfs: fix error handling in refresh_dir

2013-11-20 Thread Samuel Thibault
Justus Winter, le Wed 20 Nov 2013 14:38:00 +0100, a écrit : > Found using the Clang Static Analyzer. > > * ftpfs/dir.c (refresh_dir): Fix error handling. > --- > ftpfs/dir.c |9 +++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/ftpfs/dir.c b/ftpfs/dir.c > index da5

Re: [PATCH 10/12] libshouldbeinlibc: fix dead initialization in fmt_named_interval

2013-11-20 Thread Samuel Thibault
Justus Winter, le Wed 20 Nov 2013 14:38:03 +0100, a écrit : > Found using the Clang Static Analyzer. > > * libshouldbeinlibc/timefmt.c (fmt_named_interval): Fix dead > initialization by declaring ts in the loop. > --- > libshouldbeinlibc/timefmt.c |3 +-- > 1 file changed, 1 insertion(+), 2

Re: [PATCH 11/12] mach-defpager: drop all register qualifiers

2013-11-20 Thread Samuel Thibault
Justus Winter, le Wed 20 Nov 2013 14:38:04 +0100, a écrit : > * mach-defpager/default_pager.c: Drop register qualifiers. > * mach-defpager/kalloc.c: Likewise. > * mach-defpager/queue.h: Likewise. > * mach-defpager/wiring.c: Likewise. Ack. > --- > mach-defpager/default_pager.c | 182 > +

Re: [PATCH 12/12] libshouldbeinlibc: fix error handling in maptime_map

2013-11-20 Thread Samuel Thibault
Justus Winter, le Wed 20 Nov 2013 14:38:05 +0100, a écrit : > Found using the Clang Static Analyzer. > > * libshouldbeinlibc/maptime.c (maptime_map): Fix error handling. Ack > --- > libshouldbeinlibc/maptime.c | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --

Re: [PATCH 09/19] ddb/db_run.c: move declaration of brpc into SOFTWARE_SSTEP

2013-11-20 Thread Samuel Thibault
Guillem Jover, le Wed 20 Nov 2013 23:50:59 +0100, a écrit : > On Wed, 2013-11-20 at 21:48:14 +0100, Samuel Thibault wrote: > > Guillem Jover, le Wed 20 Nov 2013 21:09:08 +0100, a écrit : > > > > #ifdef SOFTWARE_SSTEP > > > > + db_addr_t brpc; > > > > /* Account for instructio

Re: [PATCH 03/19] Fix call of function with qualified void return type

2013-11-20 Thread Guillem Jover
On Wed, 2013-11-20 at 21:33:54 +0100, Marin Ramesa wrote: > On 20.11.2013 21:18:14, Guillem Jover wrote: > > > diff --git a/i386/i386/setjmp.h b/i386/i386/setjmp.h > > > index 667eecf..08626e3 100644 > > > --- a/i386/i386/setjmp.h > > > +++ b/i386/i386/setjmp.h > > > @@ -36,7 +36,7 @@ typedef struc

Re: [RFC] Enable thread termination

2013-11-20 Thread Samuel Thibault
Richard Braun, le Mon 18 Nov 2013 00:36:14 +0100, a écrit : > On Sun, Nov 17, 2013 at 09:41:03PM +0100, Samuel Thibault wrote: > > Richard Braun, le Sun 17 Nov 2013 17:13:23 +0100, a écrit : > > > This patch makes use of a new GNU Mach specific call > > > (thread_terminate_release [1]) so that thre

Re: [PATCH 03/19] Fix call of function with qualified void return type

2013-11-20 Thread Marin Ramesa
On 21.11.2013 00:28:17, Guillem Jover wrote: > On Wed, 2013-11-20 at 21:33:54 +0100, Marin Ramesa wrote: > > On 20.11.2013 21:18:14, Guillem Jover wrote: > > > > diff --git a/i386/i386/setjmp.h b/i386/i386/setjmp.h > > > > index 667eecf..08626e3 100644 > > > > --- a/i386/i386/setjmp.h > > > > +++ b