[Swan-dev] do_command_win2k

D. Hugh Redelmeier hugh at mimosa.com
Mon Sep 21 09:00:31 EEST 2015

| From: Paul Wouters <paul at nohats.ca>

| > I just moved invoke_command to kernel.c since each definition was the same
| > (up to bugs).  I guess that's wrong for Win32 (but I'm not sure).
| I'm not sure I like that. The idea was that each OS has their own
| specific things that are needed.

But they did not have their own specific things.  Each was identical
(except for additional logging for Linux, logging that would be
appropriate for the other systems).

Oh, and a typedef for sigaction_t.  That might clash on BSD (but it
should not be different since its structure is dictated by POSIX).

| The win2k stuff tried to use a precursor of the "powershell" to
| configure SA's into the kernel. Most likely we just did not complete
| the work.

win2k_kernel_ops references do_command_win2k.

do_command_win2k is not defined.

do_command_win2k, if it were to exist, might have called a file_static
invoke_command, but that too does not exist.

So how can this commit be a problem?

| However, we did have the mechanism working on BSD/OSX.

Yeah.  With code identical to Linux.


The bottom line is we have code cloning, a software engineering sin (a
classic kind of "code smell"

Everyone should be trying to avoid creating clones and trying to
eliminate what we have.

More information about the Swan-dev mailing list