-----Message d'origine-----
Date: Thu, 4 Jul 2013 16:27:25 +0000
From: "Thibault, Daniel" <[email protected]>
To: "[email protected]" <[email protected]>

   [...] what strikes me as odd is the lsm cmd type value: it is 
LTTNG_ENABLE_EVENT (6) in both cases.  Shouldn't it rather be 
LTTNG_ENABLE_ALL_EVENT (7)?  This lsm cmd type assignation occurs in only one 
place, lttng-tools/src/lib/lttng-ctl/lttng-ctl.c:685:

        if (ev->name[0] != '\0') {
                lsm.cmd_type = LTTNG_ENABLE_EVENT;
        } else {
                lsm.cmd_type = LTTNG_ENABLE_ALL_EVENT;
        }

   Since the command was 'lttng enable-event -a -u', one would expect 
ev->name[0] to indeed be '\0', so what's going on?
-----Fin du message d'origine-----

   I added a DBG statement and promptly found out that lttng-ctl.c's test 
should be:

        if (ev->name[0] != '*') {

   Because lttng_enable_event receives ev->name == "*" , not "".

Daniel U. Thibault
Protection des systèmes et contremesures (PSC) | Systems Protection & 
Countermeasures (SPC)
Cyber sécurité pour les missions essentielles (CME) | Mission Critical Cyber 
Security (MCCS)
R & D pour la défense Canada - Valcartier (RDDC Valcartier) | Defence R&D 
Canada - Valcartier (DRDC Valcartier)
2459 route de la Bravoure
Québec QC  G3J 1X5
CANADA
Vox : (418) 844-4000 x4245
Fax : (418) 844-4538
NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
Gouvernement du Canada | Government of Canada
<http://www.valcartier.drdc-rddc.gc.ca/>

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Reply via email to