public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: chrubis@suse.cz
To: alexey.kodanev@oracle.com
Cc: vasily.isaenko@oracle.com, ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH v3] fw_load: new test of device firmware loading
Date: Wed, 19 Jun 2013 13:44:46 +0200	[thread overview]
Message-ID: <20130619114446.GC24520@rei> (raw)
In-Reply-To: <51C180F6.7040204@oracle.com>

Hi!
> >>> What about creating module_exists() module_load() and module_unload()
> >>> library functions?
> >> Yeah, it is possible. Could I use tst_resource files for that? Or perhaps,
> >> would it be better to create tst_modules files?
> > Start a separate source file for that, tst_module(s) is OK.
> >
> I would like to implement tst_module_load() function with variable 
> argument list
> (use for command line parameters of the insmod command).
> There is a macro EXPAND_VAR_ARGS defined in tst_res.c, which might be 
> used by
> that function. Is it possible to move it outside of the tst_res.c file, 
> where it can be
> easily accessed by other c files?

The standard way for this is to create internal header named common.h or
similar stored under the lib/ directory for the common macros/internal
only API.

But looking at the body of the macro, there is assert(strlen(buf) > 0)
which would mean that we can't pass empty parameters to the
module_load() function (given that the interface is module_load(const
char *module_name, const char *params, ...) or similar). So the easiest
way would IMHO be just copy part of the macro into the new code or write
it from scratch.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

      parent reply	other threads:[~2013-06-19 11:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-17 13:01 [LTP] [PATCH v3] fw_load: new test of device firmware loading Alexey Kodanev
2013-06-18 12:28 ` chrubis
     [not found]   ` <51C064BD.1040104@oracle.com>
2013-06-18 14:21     ` chrubis
     [not found]       ` <51C180F6.7040204@oracle.com>
2013-06-19 11:44         ` chrubis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130619114446.GC24520@rei \
    --to=chrubis@suse.cz \
    --cc=alexey.kodanev@oracle.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=vasily.isaenko@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox