search for: no_environment

Displaying 3 results from an estimated 3 matches for "no_environment".

2013 Jul 17
2
Redirecting libguestfs error messages
Hi, When I register a callback for events with this function call: eh = guestfs_set_event_callback(g, message_callback, GUESTFS_EVENT_ALL, 0, dev); Shouldnt it capture and redirect messages like this to message_callback(): "libguestfs: error: lstat: /.Trash: No such file or directory" I still get them in stderr .. Thanks, Or
2013 Jul 17
0
Re: Redirecting libguestfs error messages
...ssages are handled by a separate path from log/trace/debug messages. It's possible to capture error messages and send them somewhere else (or nowhere). Here's how to do it from C: (1) Replace guestfs_create with guestfs_create_flags: guestfs_h *g = guestfs_create_flags (GUESTFS_CREATE_NO_ENVIRONMENT); if (!g) { /* guestfs_create_flags with the flag GUESTFS_CREATE_NO_ENVIRONMENT * never prints anything on stderr. If it fails, it sets the * global errno. So something like this should be used: */ fprintf (logfp, "error: %s\n", strerror (errno)); exit (EXIT...
2013 Jul 17
1
Re: Redirecting libguestfs error messages
...from > log/trace/debug messages. > > It's possible to capture error messages and send them somewhere else > (or nowhere). Here's how to do it from C: > > (1) Replace guestfs_create with guestfs_create_flags: > > guestfs_h *g = guestfs_create_flags (GUESTFS_CREATE_NO_ENVIRONMENT); > if (!g) { > /* guestfs_create_flags with the flag GUESTFS_CREATE_NO_ENVIRONMENT > * never prints anything on stderr. If it fails, it sets the > * global errno. So something like this should be used: > */ > fprintf (logfp, "error: %s\n", str...