along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <errno.h>
-#include <string.h>
-#include <stdio.h>
-#include <fcntl.h>
#include "hostname-setup.h"
#include "util.h"
int main(int argc, char* argv[]) {
int r;
- if ((r = hostname_setup()) < 0)
- fprintf(stderr, "hostname: %s\n", strerror(-r));
+ r = hostname_setup();
+ if (r < 0)
+ log_error_errno(r, "hostname: %m");
return 0;
}