diff --git a/libkmod/libkmod-index.c b/libkmod/libkmod-index.c index bbe28a5..4f19f48 100644 --- a/libkmod/libkmod-index.c +++ b/libkmod/libkmod-index.c @@ -97,7 +97,6 @@ static uint32_t read_long(FILE *in) * They help build wildcard key strings to pass to fnmatch(), * as well as building values of matching keys. */ - struct buffer { char *bytes; unsigned size; @@ -156,7 +155,6 @@ static void buf_pushchar(struct buffer *buf, char ch) buf->used++; } -/* like buf_pushchars(), but the string comes from a file */ static unsigned buf_freadchars(struct buffer *buf, FILE *in) { unsigned i = 0; @@ -186,9 +184,8 @@ static void buf_clear(struct buffer *buf) } /* - * Index file searching (used only by modprobe) + * Index file searching */ - struct index_node_f { FILE *file; char *prefix; /* path compression */ @@ -305,7 +302,6 @@ void index_file_close(struct index_file *idx) free(idx); } - static struct index_node_f *index_readroot(struct index_file *in) { return index_read(in->file, in->root_offset); diff --git a/libkmod/libkmod-index.h b/libkmod/libkmod-index.h index b4700f7..8a8fd31 100644 --- a/libkmod/libkmod-index.h +++ b/libkmod/libkmod-index.h @@ -157,15 +157,7 @@ enum node_offset { struct index_file; struct index_file *index_file_open(const char *filename); void index_file_close(struct index_file *index); - -/* Return value for first matching key. - Keys must be exactly equal to match - i.e. there are no wildcard patterns -*/ char *index_search(struct index_file *index, const char *key); - -/* Return values for all matching keys. - The keys in the index are treated as wildcard patterns using fnmatch() -*/ struct index_value *index_searchwild(struct index_file *index, const char *key); void index_values_free(struct index_value *values);