diff --git a/zdev/include/misc.h b/zdev/include/misc.h index 61b300e7..e700c9c7 100644 --- a/zdev/include/misc.h +++ b/zdev/include/misc.h @@ -181,7 +181,6 @@ char *config_read_cmd_output(const char *, int, err_t); exit_code_t misc_write_text_file(const char *, const char *, err_t); exit_code_t misc_write_text_file_retry(const char *, const char *, err_t); exit_code_t misc_mktemp(char **, int *); -char *misc_readlink(const char *path); config_t get_config(int act, int pers, int ac); bool is_zvm(void); bool is_terminal(void); diff --git a/zdev/src/misc.c b/zdev/src/misc.c index b7f082ef..d95c1209 100644 --- a/zdev/src/misc.c +++ b/zdev/src/misc.c @@ -1047,28 +1047,6 @@ exit_code_t misc_write_text_file_retry(const char *path, const char *text, return rc == 0 ? EXIT_OK : EXIT_RUNTIME_ERROR; } -#define READLINE_SIZE 4096 - -/* Return a newly allocated string containing the contents of the symbolic link - * at the specified path or NULL on error. */ -char *misc_readlink(const char *path) -{ - char *name, *name2; - ssize_t len; - - debug("Reading link %s\n", path); - name = misc_malloc(READLINE_SIZE); - len = readlink(path, name, READLINE_SIZE - 1); - if (len < 0) { - free(name); - return NULL; - } - name[len++] = 0; - - name2 = realloc(name, len); - return (name2) ? name2 : name; -} - /* Determine configuration set. */ config_t get_config(int active, int persistent, int autoconf) {