search for: host_utsname

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

2014 Oct 23
17
[PATCH 00/16] Small bits of non-Linux porting
Hi, from time to time, there have been requests (or attempts, like the mingw port posted on the list some months ago) to make libguestfs work on OSes different than Linux. Of course this would imply using a fixed appliance, since it is currently heavily dependent on Linux. The attached series provides some easy changes in this direction, resolving some of the easy issues found in porting to
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...to point to the source tests/c-api\n" + "directory."); if (asprintf (&ret, "%s%s", srcdir, path + 7) == -1) error (EXIT_FAILURE, errno, "asprintf"); @@ -485,17 +482,12 @@ check_cross_appliance (guestfs_h *g) struct guestfs_utsname host_utsname; r = uname (&host); - if (r == -1) { - fprintf (stderr, "call to uname failed\n"); - exit (EXIT_FAILURE); - } + if (r == -1) + error (EXIT_FAILURE, errno, "uname"); appliance = guestfs_utsname (g); - if (appliance == NULL) { - fprintf (stderr, &quot...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
Wherever we had code which did: if (something_bad) { perror (...); exit (EXIT_FAILURE); } replace this with use of the error(3) function: if (something_bad) error (EXIT_FAILURE, errno, ...); The error(3) function is supplied by glibc, or by gnulib on platforms which don't have it, and is much more flexible than perror(3). Since we already use error(3), there seems to be