[libvirt] [PATCH] virt-login-shell joins users into lxc container.
Daniel J Walsh
dwalsh at redhat.com
Fri Jul 26 16:26:36 UTC 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 07/26/2013 07:40 AM, Daniel P. Berrange wrote:
> On Fri, Jul 26, 2013 at 07:38:31AM -0400, Daniel J Walsh wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>
>> I can't seem to get the error reporting to turn on, what am I doing
>> wrong.,
>>
>> if (virInitialize() < 0) { fprintf(stderr, _("Failed to initialize
>> libvirt")); return EXIT_FAILURE; }
>>
>> if (virErrorInitialize() < 0) { fprintf(stderr, _("Failed to initialize
>> libvirt Error Handling")); return EXIT_FAILURE; }
>>
>> virSetErrorFunc(NULL, NULL);
>>
>>
>> virReportSystemError(EINVAL, "%s", _("Test"));
>>
>> And I get no output, I thought I would get error on stderr?
>
> You would, except that you just turned off printing to stderr by calling
> virSetErrorFunc in that way.
>
>
> Daniel
>
Am I misreading this?
* virSetErrorFunc:
* @userData: pointer to the user data provided in the handler callback
* @handler: the function to get called in case of error or NULL
*
* Set a library global error handling function, if @handler is NULL,
* it will reset to default printing on stderr. The error raised there
* are those for which no handler at the connection level could caught.
*/
Looks like setting handler to Null reset default printing on stderr?
But I am getting no output whether or not I set this.
I am attaching a hacked virt-login-shell.c which gives me no output.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlHyozwACgkQrlYvE4MpobMjAACePralBci9M6O0wshnO1+bXXVC
a4EAn1/cfC8ng8XlLTO9DpiFetmDr9wv
=+h5o
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: virt-login-shell.c
Type: text/x-csrc
Size: 1575 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130726/e0951192/attachment-0001.bin>
More information about the libvir-list
mailing list