mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
daemon: switch from read_file to read_whole_file
Since we have already an helper to read a file, use it instead of the gnulib function.
This commit is contained in:
@@ -26,8 +26,6 @@
|
||||
#include <errno.h>
|
||||
#include <error.h>
|
||||
|
||||
#include "read-file.h"
|
||||
|
||||
#include "daemon.h"
|
||||
#include "actions.h"
|
||||
#include "optgroups.h"
|
||||
@@ -39,7 +37,7 @@ read_error_file (char *error_file)
|
||||
size_t len;
|
||||
char *str;
|
||||
|
||||
str = read_file (error_file, &len);
|
||||
str = read_whole_file (error_file, &len);
|
||||
if (str == NULL) {
|
||||
str = strdup ("(no error)");
|
||||
if (str == NULL)
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "read-file.h"
|
||||
|
||||
#include "guestfs_protocol.h"
|
||||
#include "daemon.h"
|
||||
#include "actions.h"
|
||||
@@ -107,7 +105,7 @@ read_error_file (char *error_file)
|
||||
size_t len;
|
||||
char *str;
|
||||
|
||||
str = read_file (error_file, &len);
|
||||
str = read_whole_file (error_file, &len);
|
||||
if (str == NULL) {
|
||||
str = strdup ("(no error)");
|
||||
if (str == NULL)
|
||||
|
||||
Reference in New Issue
Block a user