Inspecting modules.symbols is fine after a kernel has been installed but
not if a kernel tree has not been installed. If a kernel tree has not
been installed, check the .config file.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7131 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Add "XXX" comments in a few places about potential problems seen in SCST code,
for future investigation and possible repair.
Signed-off-by: David Butterfield <dab21774@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7123 d57e44dd-8a1f-0410-8b47-8ef2f437770f
casting const to non-const
uninitialized structure members
non-static local function
missing enumerated switch-value cases
Signed-off-by: David Butterfield <dab21774@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7122 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Move some #ifdefs to also cover declarations used only inside the #ifdef.
This is to avoid compiler warnings about unused variables.
Signed-off-by: David Butterfield <dab21774@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7121 d57e44dd-8a1f-0410-8b47-8ef2f437770f
DEF_DIF_FILENAME_TMPL should not have the parentheses; I used it in some
context where that became apparent.
Signed-off-by: David Butterfield <dab21774@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7120 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The "res" is unconditionally set by the call to scst_dg_sysfs_add(),
so setting it to ENOMEM above that is superfluous.
Signed-off-by: David Butterfield <dab21774@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7119 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Take lock before a call that ends up at the lockdep_assert_held() in
scst_del_free_acg() without locking.
Signed-off-by: David Butterfield <dab21774@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7118 d57e44dd-8a1f-0410-8b47-8ef2f437770f
scst_del_free_acg() does lockdep_assert_held(&scst_mutex), so we'd better take
the lock before calling it.
Signed-off-by: David Butterfield <dab21774@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7117 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Valgrind noticed that the "name" allocated in scst_proc_group_add() was
leaking. It turns out that scst_alloc_add_acg makes its own copy of the name
passed to it from this code, making the string duplication done here redundant
(and leaky). The change eliminates the string duplication (along with all its
associated error handling logic) and simply passes the (unowned) incoming
string down for duplication below.
Signed-off-by: David Butterfield <dab21774@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7115 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This fixes four similar instances of a very misleading and confusing logging
statement, which would print a "Wrong value" that had already been corrected by
the check function.
Signed-off-by: David Butterfield <dab21774@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7112 d57e44dd-8a1f-0410-8b47-8ef2f437770f
to exist as valid addressable memory beyond the NULL byte.
Signed-off-by: David Butterfield <dab21774@gmail.com>
with small addition to force set last byte NULL
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7109 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Use 'unsigned int' instead of 'unsigned' and 'unsigned long long'
instead of 'long long unsigned'.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7103 d57e44dd-8a1f-0410-8b47-8ef2f437770f